Skip to content

Commit

Permalink
fix(re index): log error rather than returning error and panicking
Browse files Browse the repository at this point in the history
  • Loading branch information
Tangui-Bitfly committed Nov 27, 2024
1 parent 5b7b9d2 commit da00e8d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/misc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,12 @@ func reIndexBlocks(start uint64, end uint64, bt *db.Bigtable, client *rpc.Erigon
}
blocks, err := client.GetBlocks(height, heightEnd, "geth")
if err != nil {
return fmt.Errorf("error getting block %v from the node: %w", height, err)
logrus.WithFields(map[string]interface{}{
"message": err.Error(),
"start": height,
"end": heightEnd,
}).Error("cannot read block")
return nil
}
for _, block := range blocks {
sink <- block
Expand Down

0 comments on commit da00e8d

Please sign in to comment.