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 a74b75f commit c7d4d69
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,11 @@ func genesisDepositsExporter(client rpc.Client) {
continue
}

for _, validator := range genesisValidators.Data {
logger.Infof("exporting deposit data for genesis validator %v", validator.Index)
logger.Infof("exporting deposit data for genesis %v validators %v", len(genesisValidators.Data))
for i, validator := range genesisValidators.Data {
if i%1000 == 0 {
logger.Infof("exporting deposit data for genesis validator %v (%v/%v)", validator.Index, i, len(genesisValidators.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 c7d4d69

Please sign in to comment.