eth/filters: remove unused parameter t in newTestFilterSystem

This commit is contained in:
Felix Lange 2025-03-17 15:42:03 +01:00
parent fc8e4e0397
commit ef465a3a9e
2 changed files with 13 additions and 13 deletions

View file

@ -181,7 +181,7 @@ func (b *testBackend) setPending(block *types.Block, receipts types.Receipts) {
b.pendingReceipts = receipts
}
func newTestFilterSystem(t testing.TB, db ethdb.Database, cfg Config) (*testBackend, *FilterSystem) {
func newTestFilterSystem(db ethdb.Database, cfg Config) (*testBackend, *FilterSystem) {
backend := &testBackend{db: db}
sys := NewFilterSystem(backend, cfg)
return backend, sys
@ -197,7 +197,7 @@ func TestBlockSubscription(t *testing.T) {
var (
db = rawdb.NewMemoryDatabase()
backend, sys = newTestFilterSystem(t, db, Config{})
backend, sys = newTestFilterSystem(db, Config{})
api = NewFilterAPI(sys)
genesis = &core.Genesis{
Config: params.TestChainConfig,
@ -252,7 +252,7 @@ func TestPendingTxFilter(t *testing.T) {
var (
db = rawdb.NewMemoryDatabase()
backend, sys = newTestFilterSystem(t, db, Config{})
backend, sys = newTestFilterSystem(db, Config{})
api = NewFilterAPI(sys)
transactions = []*types.Transaction{
@ -308,7 +308,7 @@ func TestPendingTxFilterFullTx(t *testing.T) {
var (
db = rawdb.NewMemoryDatabase()
backend, sys = newTestFilterSystem(t, db, Config{})
backend, sys = newTestFilterSystem(db, Config{})
api = NewFilterAPI(sys)
transactions = []*types.Transaction{
@ -364,7 +364,7 @@ func TestPendingTxFilterFullTx(t *testing.T) {
func TestLogFilterCreation(t *testing.T) {
var (
db = rawdb.NewMemoryDatabase()
_, sys = newTestFilterSystem(t, db, Config{})
_, sys = newTestFilterSystem(db, Config{})
api = NewFilterAPI(sys)
testCases = []struct {
@ -411,7 +411,7 @@ func TestInvalidLogFilterCreation(t *testing.T) {
var (
db = rawdb.NewMemoryDatabase()
_, sys = newTestFilterSystem(t, db, Config{})
_, sys = newTestFilterSystem(db, Config{})
api = NewFilterAPI(sys)
)
@ -437,7 +437,7 @@ func TestInvalidGetLogsRequest(t *testing.T) {
var (
db = rawdb.NewMemoryDatabase()
_, sys = newTestFilterSystem(t, db, Config{})
_, sys = newTestFilterSystem(db, Config{})
api = NewFilterAPI(sys)
blockHash = common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111111")
)
@ -463,7 +463,7 @@ func TestInvalidGetRangeLogsRequest(t *testing.T) {
var (
db = rawdb.NewMemoryDatabase()
_, sys = newTestFilterSystem(t, db, Config{})
_, sys = newTestFilterSystem(db, Config{})
api = NewFilterAPI(sys)
)
@ -478,7 +478,7 @@ func TestLogFilter(t *testing.T) {
var (
db = rawdb.NewMemoryDatabase()
backend, sys = newTestFilterSystem(t, db, Config{})
backend, sys = newTestFilterSystem(db, Config{})
api = NewFilterAPI(sys)
firstAddr = common.HexToAddress("0x1111111111111111111111111111111111111111")
@ -583,7 +583,7 @@ func TestPendingTxFilterDeadlock(t *testing.T) {
var (
db = rawdb.NewMemoryDatabase()
backend, sys = newTestFilterSystem(t, db, Config{Timeout: timeout})
backend, sys = newTestFilterSystem(db, Config{Timeout: timeout})
api = NewFilterAPI(sys)
done = make(chan struct{})
)

View file

@ -62,7 +62,7 @@ func BenchmarkFiltersUnindexed(b *testing.B) {
func benchmarkFilters(b *testing.B, history uint64, noHistory bool) {
var (
db = rawdb.NewMemoryDatabase()
backend, sys = newTestFilterSystem(b, db, Config{})
backend, sys = newTestFilterSystem(db, Config{})
key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
addr1 = crypto.PubkeyToAddress(key1.PublicKey)
addr2 = common.BytesToAddress([]byte("jeff"))
@ -138,7 +138,7 @@ func TestFiltersUnindexed(t *testing.T) {
func testFilters(t *testing.T, history uint64, noHistory bool) {
var (
db = rawdb.NewMemoryDatabase()
backend, sys = newTestFilterSystem(t, db, Config{})
backend, sys = newTestFilterSystem(db, Config{})
// Sender account
key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
addr = crypto.PubkeyToAddress(key1.PublicKey)
@ -422,7 +422,7 @@ func testFilters(t *testing.T, history uint64, noHistory bool) {
func TestRangeLogs(t *testing.T) {
var (
db = rawdb.NewMemoryDatabase()
backend, sys = newTestFilterSystem(t, db, Config{})
backend, sys = newTestFilterSystem(db, Config{})
gspec = &core.Genesis{
Config: params.TestChainConfig,
Alloc: types.GenesisAlloc{},