mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
eth/filters: remove unused parameter t in newTestFilterSystem
This commit is contained in:
parent
fc8e4e0397
commit
ef465a3a9e
2 changed files with 13 additions and 13 deletions
|
|
@ -181,7 +181,7 @@ func (b *testBackend) setPending(block *types.Block, receipts types.Receipts) {
|
||||||
b.pendingReceipts = 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}
|
backend := &testBackend{db: db}
|
||||||
sys := NewFilterSystem(backend, cfg)
|
sys := NewFilterSystem(backend, cfg)
|
||||||
return backend, sys
|
return backend, sys
|
||||||
|
|
@ -197,7 +197,7 @@ func TestBlockSubscription(t *testing.T) {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
db = rawdb.NewMemoryDatabase()
|
db = rawdb.NewMemoryDatabase()
|
||||||
backend, sys = newTestFilterSystem(t, db, Config{})
|
backend, sys = newTestFilterSystem(db, Config{})
|
||||||
api = NewFilterAPI(sys)
|
api = NewFilterAPI(sys)
|
||||||
genesis = &core.Genesis{
|
genesis = &core.Genesis{
|
||||||
Config: params.TestChainConfig,
|
Config: params.TestChainConfig,
|
||||||
|
|
@ -252,7 +252,7 @@ func TestPendingTxFilter(t *testing.T) {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
db = rawdb.NewMemoryDatabase()
|
db = rawdb.NewMemoryDatabase()
|
||||||
backend, sys = newTestFilterSystem(t, db, Config{})
|
backend, sys = newTestFilterSystem(db, Config{})
|
||||||
api = NewFilterAPI(sys)
|
api = NewFilterAPI(sys)
|
||||||
|
|
||||||
transactions = []*types.Transaction{
|
transactions = []*types.Transaction{
|
||||||
|
|
@ -308,7 +308,7 @@ func TestPendingTxFilterFullTx(t *testing.T) {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
db = rawdb.NewMemoryDatabase()
|
db = rawdb.NewMemoryDatabase()
|
||||||
backend, sys = newTestFilterSystem(t, db, Config{})
|
backend, sys = newTestFilterSystem(db, Config{})
|
||||||
api = NewFilterAPI(sys)
|
api = NewFilterAPI(sys)
|
||||||
|
|
||||||
transactions = []*types.Transaction{
|
transactions = []*types.Transaction{
|
||||||
|
|
@ -364,7 +364,7 @@ func TestPendingTxFilterFullTx(t *testing.T) {
|
||||||
func TestLogFilterCreation(t *testing.T) {
|
func TestLogFilterCreation(t *testing.T) {
|
||||||
var (
|
var (
|
||||||
db = rawdb.NewMemoryDatabase()
|
db = rawdb.NewMemoryDatabase()
|
||||||
_, sys = newTestFilterSystem(t, db, Config{})
|
_, sys = newTestFilterSystem(db, Config{})
|
||||||
api = NewFilterAPI(sys)
|
api = NewFilterAPI(sys)
|
||||||
|
|
||||||
testCases = []struct {
|
testCases = []struct {
|
||||||
|
|
@ -411,7 +411,7 @@ func TestInvalidLogFilterCreation(t *testing.T) {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
db = rawdb.NewMemoryDatabase()
|
db = rawdb.NewMemoryDatabase()
|
||||||
_, sys = newTestFilterSystem(t, db, Config{})
|
_, sys = newTestFilterSystem(db, Config{})
|
||||||
api = NewFilterAPI(sys)
|
api = NewFilterAPI(sys)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -437,7 +437,7 @@ func TestInvalidGetLogsRequest(t *testing.T) {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
db = rawdb.NewMemoryDatabase()
|
db = rawdb.NewMemoryDatabase()
|
||||||
_, sys = newTestFilterSystem(t, db, Config{})
|
_, sys = newTestFilterSystem(db, Config{})
|
||||||
api = NewFilterAPI(sys)
|
api = NewFilterAPI(sys)
|
||||||
blockHash = common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111111")
|
blockHash = common.HexToHash("0x1111111111111111111111111111111111111111111111111111111111111111")
|
||||||
)
|
)
|
||||||
|
|
@ -463,7 +463,7 @@ func TestInvalidGetRangeLogsRequest(t *testing.T) {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
db = rawdb.NewMemoryDatabase()
|
db = rawdb.NewMemoryDatabase()
|
||||||
_, sys = newTestFilterSystem(t, db, Config{})
|
_, sys = newTestFilterSystem(db, Config{})
|
||||||
api = NewFilterAPI(sys)
|
api = NewFilterAPI(sys)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -478,7 +478,7 @@ func TestLogFilter(t *testing.T) {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
db = rawdb.NewMemoryDatabase()
|
db = rawdb.NewMemoryDatabase()
|
||||||
backend, sys = newTestFilterSystem(t, db, Config{})
|
backend, sys = newTestFilterSystem(db, Config{})
|
||||||
api = NewFilterAPI(sys)
|
api = NewFilterAPI(sys)
|
||||||
|
|
||||||
firstAddr = common.HexToAddress("0x1111111111111111111111111111111111111111")
|
firstAddr = common.HexToAddress("0x1111111111111111111111111111111111111111")
|
||||||
|
|
@ -583,7 +583,7 @@ func TestPendingTxFilterDeadlock(t *testing.T) {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
db = rawdb.NewMemoryDatabase()
|
db = rawdb.NewMemoryDatabase()
|
||||||
backend, sys = newTestFilterSystem(t, db, Config{Timeout: timeout})
|
backend, sys = newTestFilterSystem(db, Config{Timeout: timeout})
|
||||||
api = NewFilterAPI(sys)
|
api = NewFilterAPI(sys)
|
||||||
done = make(chan struct{})
|
done = make(chan struct{})
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ func BenchmarkFiltersUnindexed(b *testing.B) {
|
||||||
func benchmarkFilters(b *testing.B, history uint64, noHistory bool) {
|
func benchmarkFilters(b *testing.B, history uint64, noHistory bool) {
|
||||||
var (
|
var (
|
||||||
db = rawdb.NewMemoryDatabase()
|
db = rawdb.NewMemoryDatabase()
|
||||||
backend, sys = newTestFilterSystem(b, db, Config{})
|
backend, sys = newTestFilterSystem(db, Config{})
|
||||||
key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
|
key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
|
||||||
addr1 = crypto.PubkeyToAddress(key1.PublicKey)
|
addr1 = crypto.PubkeyToAddress(key1.PublicKey)
|
||||||
addr2 = common.BytesToAddress([]byte("jeff"))
|
addr2 = common.BytesToAddress([]byte("jeff"))
|
||||||
|
|
@ -138,7 +138,7 @@ func TestFiltersUnindexed(t *testing.T) {
|
||||||
func testFilters(t *testing.T, history uint64, noHistory bool) {
|
func testFilters(t *testing.T, history uint64, noHistory bool) {
|
||||||
var (
|
var (
|
||||||
db = rawdb.NewMemoryDatabase()
|
db = rawdb.NewMemoryDatabase()
|
||||||
backend, sys = newTestFilterSystem(t, db, Config{})
|
backend, sys = newTestFilterSystem(db, Config{})
|
||||||
// Sender account
|
// Sender account
|
||||||
key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
|
key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
|
||||||
addr = crypto.PubkeyToAddress(key1.PublicKey)
|
addr = crypto.PubkeyToAddress(key1.PublicKey)
|
||||||
|
|
@ -422,7 +422,7 @@ func testFilters(t *testing.T, history uint64, noHistory bool) {
|
||||||
func TestRangeLogs(t *testing.T) {
|
func TestRangeLogs(t *testing.T) {
|
||||||
var (
|
var (
|
||||||
db = rawdb.NewMemoryDatabase()
|
db = rawdb.NewMemoryDatabase()
|
||||||
backend, sys = newTestFilterSystem(t, db, Config{})
|
backend, sys = newTestFilterSystem(db, Config{})
|
||||||
gspec = &core.Genesis{
|
gspec = &core.Genesis{
|
||||||
Config: params.TestChainConfig,
|
Config: params.TestChainConfig,
|
||||||
Alloc: types.GenesisAlloc{},
|
Alloc: types.GenesisAlloc{},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue