Skip to content

Commit

Permalink
eth/filters: reset filter.begin in BenchmarkFilters (ethereum#28830)
Browse files Browse the repository at this point in the history
  • Loading branch information
darioush authored and Dergarcon committed Jan 31, 2024
1 parent acb1adf commit 2776748
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions eth/filters/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ func BenchmarkFilters(b *testing.B) {
filter := sys.NewRangeFilter(0, -1, []common.Address{addr1, addr2, addr3, addr4}, nil)

for i := 0; i < b.N; i++ {
filter.begin = 0
logs, _ := filter.Logs(context.Background())
if len(logs) != 4 {
b.Fatal("expected 4 logs, got", len(logs))
Expand Down

0 comments on commit 2776748

Please sign in to comment.