Skip to content

Commit

Permalink
catch small bug when finalityStatus is in the future (sometimes on no…
Browse files Browse the repository at this point in the history
…de startup?), we revert to '-200' rule
  • Loading branch information
sduchesneau committed Feb 13, 2025
1 parent f5c74d6 commit 9c90c48
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion eth/tracers/firehose.go
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,10 @@ func (f *Firehose) printBlockToFirehose(block *pbeth.Block, finalityStatus *Fina
}

libNum := finalityStatus.LastIrreversibleBlockNumber
if finalityStatus.IsEmpty() {
if finalityStatus.IsEmpty() || libNum > block.Number {
// the 'libNum> > block.Number> is bug fix for a situation that has only been seen once: the first block emitted from a node had a lib in the future
// in this case, it is considered invalid and ignored. The next blocks should have correct LIB
//
// FIXME: We should have access to the genesis block to perform this operation to ensure we never go below the
// the genesis block
if block.Number >= 200 {
Expand Down

0 comments on commit 9c90c48

Please sign in to comment.