Skip to content

Commit

Permalink
Fix IsEmpty header
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBger committed May 21, 2024
1 parent a942318 commit f5fa975
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eth/tracers/firehose.go
Original file line number Diff line number Diff line change
Expand Up @@ -2172,8 +2172,10 @@ func (s *FinalityStatus) Reset() {
s.LastIrreversibleBlockHash = nil
}

var EmptyHash = bytes.Repeat([]byte{0}, common.HashLength)

func (s *FinalityStatus) IsEmpty() bool {
return s.LastIrreversibleBlockNumber == 0 && len(s.LastIrreversibleBlockHash) == 0
return s.LastIrreversibleBlockNumber == 0 && (len(s.LastIrreversibleBlockHash) == 0) || bytes.Equal(s.LastIrreversibleBlockHash, EmptyHash)
}

var errFirehoseUnknownType = errors.New("firehose unknown tx type")
Expand Down

0 comments on commit f5fa975

Please sign in to comment.