Skip to content

Commit 9264736

Browse files
Fix bloom fallback behavior (#2494) (#2495)
## Describe your changes and provide context - fix fallback behavior - cherry-picked from v6.2.2
1 parent 6e8b04f commit 9264736

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

evmrpc/filter.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,9 @@ func (f *LogFetcher) processBatch(ctx context.Context, start, end int64, crit fi
10251025
blockBloom = f.k.GetEvmOnlyBlockBloom(providerCtx)
10261026
}
10271027

1028-
if !MatchFilters(blockBloom, bloomIndexes) {
1028+
// When we cannot retrieve a bloom for the EVM-only view (all zeroes),
1029+
// skip the bloom pre-filter instead of short-circuiting the block.
1030+
if blockBloom != (ethtypes.Bloom{}) && !MatchFilters(blockBloom, bloomIndexes) {
10291031
<-f.dbReadSemaphore
10301032
continue // skip the block if bloom filter does not match
10311033
}

0 commit comments

Comments
 (0)