diff --git a/api/internal/logic/cacherefresh.go b/api/internal/logic/cacherefresh.go index 16eb639..c067d53 100644 --- a/api/internal/logic/cacherefresh.go +++ b/api/internal/logic/cacherefresh.go @@ -57,7 +57,7 @@ func SignStatsCacheJob(ctx context.Context, svcCtx *svc.ServiceContext) { validatorSigns, err := svcCtx.BlockSignatureModel.ValidatorSignStats(ctx, signAddresses, 11) if err != nil { - logc.Errorf(ctx, "FindBlockCountDays error: %v", err) + logc.Errorf(ctx, "ValidatorSignStats error: %v", err) continue } if validatorSigns == nil { diff --git a/job/model/blocksignaturemodel.go b/job/model/blocksignaturemodel.go index 6d2d73c..57ba296 100644 --- a/job/model/blocksignaturemodel.go +++ b/job/model/blocksignaturemodel.go @@ -4,6 +4,7 @@ import ( "context" "database/sql" "fmt" + "github.com/zeromicro/go-zero/core/logc" "github.com/zeromicro/go-zero/core/stores/sqlc" "github.com/zeromicro/go-zero/core/stores/sqlx" "oasisscan-backend/common" @@ -136,6 +137,7 @@ func (m *customBlockSignatureModel) ValidatorSignStats(ctx context.Context, sign vars = append(vars, days) paramIndex = paramIndex + 1 } + logc.Errorf(ctx, query) var resp []*BlockCountDay err := m.conn.QueryRowCtx(ctx, &resp, query, vars...) switch err {