Skip to content

Commit

Permalink
Update cmd/eth1indexer/main.go
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan Benker <[email protected]>
  • Loading branch information
peterbitfly and D13ce authored Nov 27, 2023
1 parent 07dfea6 commit ad7c069
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/eth1indexer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,11 +520,11 @@ func HandleChainReorgs(bt *db.Bigtable, client *rpc.ErigonClient, depth int) err
previousBlock := i - 1
err := bt.SetLastBlockInBlocksTable(int64(previousBlock))
if err != nil {
return err
return fmt.Errorf("error setting last block [%v] in blocks table: %w", previousBlock, err)
}
err = bt.SetLastBlockInDataTable(int64(previousBlock))
if err != nil {
return err
return fmt.Errorf("error setting last block [%v] in data table: %w", previousBlock, err)
}
// now we can proceed to delete all blocks including and after the forked block
}
Expand Down

0 comments on commit ad7c069

Please sign in to comment.