Skip to content

Commit

Permalink
fix: validator sign stats.
Browse files Browse the repository at this point in the history
  • Loading branch information
romever committed Nov 18, 2024
1 parent 5a1bd00 commit 617bfb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/internal/logic/cacherefresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions job/model/blocksignaturemodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 617bfb7

Please sign in to comment.