Skip to content

Commit 830f3c7

Browse files
author
Darioush Jalali
authored
eth/filters: reset filter.begin in BenchmarkFilters (#28830)
1 parent e5d5e09 commit 830f3c7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

eth/filters/filter_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ func BenchmarkFilters(b *testing.B) {
9999
filter := sys.NewRangeFilter(0, -1, []common.Address{addr1, addr2, addr3, addr4}, nil)
100100

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

0 commit comments

Comments
 (0)