Skip to content

Commit

Permalink
(NOBIDS) less spammy logs when exporting genesis-deposits
Browse files Browse the repository at this point in the history
  • Loading branch information
guybrush committed Oct 19, 2023
1 parent 60c6d47 commit 9c61d3e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/misc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,11 @@ func main() {
}
}

for _, validator := range validators.Data {
logrus.Infof("exporting deposit data for genesis validator %v", validator.Index)
logrus.Infof("exporting deposit data for genesis %v validators", len(validators.Data))
for i, validator := range validators.Data {
if i%1000 == 0 {
logrus.Infof("exporting deposit data for genesis validator %v (of %v/%v)", validator.Index, i, len(validators.Data))
}
_, err = tx.Exec(`INSERT INTO blocks_deposits (block_slot, block_root, block_index, publickey, withdrawalcredentials, amount, signature)
VALUES (0, '\x01', $1, $2, $3, $4, $5) ON CONFLICT DO NOTHING`,
validator.Index, utils.MustParseHex(validator.Validator.Pubkey), utils.MustParseHex(validator.Validator.WithdrawalCredentials), validator.Balance, []byte{0x0},
Expand Down

0 comments on commit 9c61d3e

Please sign in to comment.