Skip to content

Commit a070da0

Browse files
guybrushinvis-bitfly
authored andcommitted
chore: please linter, improve log in misc
1 parent 8e76180 commit a070da0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

backend/cmd/misc/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ var opts = struct {
8383
*/
8484
var REQUIRES_LIST = map[string]misctypes.Requires{
8585
"app-bundle": (&commands.AppBundleCommand{}).Requires(),
86-
"update-highest-active-validatorindex": misctypes.Requires{
86+
"update-highest-active-validatorindex": {
8787
Bigtable: true,
8888
ClNode: true,
8989
},
@@ -507,7 +507,6 @@ func updateHighestActiveValidatorIndex(rpcClient *rpc.LighthouseClient) error {
507507
db.BigtableClient = bt
508508

509509
for epoch := opts.StartEpoch; epoch <= opts.EndEpoch; epoch++ {
510-
log.Infof("updating highest active validator index for epoch %v", epoch)
511510
valiMap, err := rpcClient.GetBalancesForEpoch(int64(epoch))
512511
if err != nil {
513512
return err
@@ -518,6 +517,7 @@ func updateHighestActiveValidatorIndex(rpcClient *rpc.LighthouseClient) error {
518517
highestActiveValidatorIndex = vali
519518
}
520519
}
520+
log.Infof("updating highest active validator: index: %v, epoch: %v", highestActiveValidatorIndex, epoch)
521521
err = db.BigtableClient.SaveHighestActiveValidatorIndex(context.Background(), epoch, highestActiveValidatorIndex)
522522
if err != nil {
523523
return fmt.Errorf("error updating highest active validator index: %w", err)

backend/pkg/exporter/db/db.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"database/sql"
77
"encoding/base64"
88
"fmt"
9-
"github.com/sirupsen/logrus"
109

1110
"regexp"
1211
"sort"
@@ -728,7 +727,7 @@ func SaveValidators(epoch uint64, validators []*types.Validator, client rpc.Clie
728727
end = len(validators)
729728
}
730729

731-
logrus.Infof("applying update batch from index %v to %v", i, end)
730+
log.Infof("applying update batch from index %v to %v", i, end)
732731
batch := validators[i:end]
733732
_, err := validatorStatusUpdateStmt.Exec(status, pq.Array(batch))
734733
if err != nil {

0 commit comments

Comments
 (0)