diff options
Diffstat (limited to 'eth/filters/filter_test.go')
-rw-r--r-- | eth/filters/filter_test.go | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/eth/filters/filter_test.go b/eth/filters/filter_test.go index f1c6481d7..11235e95a 100644 --- a/eth/filters/filter_test.go +++ b/eth/filters/filter_test.go @@ -32,8 +32,6 @@ import ( "github.com/ethereum/go-ethereum/params" ) -const testBloomBitsSection = 4096 - func makeReceipt(addr common.Address) *types.Receipt { receipt := types.NewReceipt(nil, false, new(big.Int)) receipt.Logs = []*types.Log{ @@ -101,7 +99,7 @@ func BenchmarkFilters(b *testing.B) { filter := New(backend, 0, -1, []common.Address{addr1, addr2, addr3, addr4}, nil) for i := 0; i < b.N; i++ { - logs, _ := filter.Find(context.Background()) + logs, _ := filter.Logs(context.Background()) if len(logs) != 4 { b.Fatal("expected 4 logs, got", len(logs)) } @@ -189,13 +187,13 @@ func TestFilters(t *testing.T) { filter := New(backend, 0, -1, []common.Address{addr}, [][]common.Hash{{hash1, hash2, hash3, hash4}}) - logs, _ := filter.Find(context.Background()) + logs, _ := filter.Logs(context.Background()) if len(logs) != 4 { t.Error("expected 4 log, got", len(logs)) } filter = New(backend, 900, 999, []common.Address{addr}, [][]common.Hash{{hash3}}) - logs, _ = filter.Find(context.Background()) + logs, _ = filter.Logs(context.Background()) if len(logs) != 1 { t.Error("expected 1 log, got", len(logs)) } @@ -204,7 +202,7 @@ func TestFilters(t *testing.T) { } filter = New(backend, 990, -1, []common.Address{addr}, [][]common.Hash{{hash3}}) - logs, _ = filter.Find(context.Background()) + logs, _ = filter.Logs(context.Background()) if len(logs) != 1 { t.Error("expected 1 log, got", len(logs)) } @@ -214,7 +212,7 @@ func TestFilters(t *testing.T) { filter = New(backend, 1, 10, nil, [][]common.Hash{{hash1, hash2}}) - logs, _ = filter.Find(context.Background()) + logs, _ = filter.Logs(context.Background()) if len(logs) != 2 { t.Error("expected 2 log, got", len(logs)) } @@ -222,7 +220,7 @@ func TestFilters(t *testing.T) { failHash := common.BytesToHash([]byte("fail")) filter = New(backend, 0, -1, nil, [][]common.Hash{{failHash}}) - logs, _ = filter.Find(context.Background()) + logs, _ = filter.Logs(context.Background()) if len(logs) != 0 { t.Error("expected 0 log, got", len(logs)) } @@ -230,14 +228,14 @@ func TestFilters(t *testing.T) { failAddr := common.BytesToAddress([]byte("failmenow")) filter = New(backend, 0, -1, []common.Address{failAddr}, nil) - logs, _ = filter.Find(context.Background()) + logs, _ = filter.Logs(context.Background()) if len(logs) != 0 { t.Error("expected 0 log, got", len(logs)) } filter = New(backend, 0, -1, nil, [][]common.Hash{{failHash}, {hash1}}) - logs, _ = filter.Find(context.Background()) + logs, _ = filter.Logs(context.Background()) if len(logs) != 0 { t.Error("expected 0 log, got", len(logs)) } |