From c8ff1fed5f097a4ce5822d3eba9de29643afe234 Mon Sep 17 00:00:00 2001 From: Pratik Patil Date: Thu, 22 May 2025 17:07:09 +0530 Subject: [PATCH] fix: integration tests --- eth/filters/test_backend.go | 8 ++++++++ tests/bor/bor_api_test.go | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/eth/filters/test_backend.go b/eth/filters/test_backend.go index f48d777007..1a58b3d15c 100644 --- a/eth/filters/test_backend.go +++ b/eth/filters/test_backend.go @@ -198,3 +198,11 @@ func (b *TestBackend) Pending() (*types.Block, types.Receipts, *state.StateDB) { func (b *TestBackend) NewMatcherBackend() filtermaps.MatcherBackend { panic("implement me") } + +func (b *TestBackend) CurrentView() *filtermaps.ChainView { + panic("implement me") +} + +func (b *TestBackend) HistoryPruningCutoff() uint64 { + return 0 +} diff --git a/tests/bor/bor_api_test.go b/tests/bor/bor_api_test.go index c0d16e3ceb..afce6d7229 100644 --- a/tests/bor/bor_api_test.go +++ b/tests/bor/bor_api_test.go @@ -109,27 +109,27 @@ func testGetTransactionReceiptsByBlock(t *testing.T, publicBlockchainAPI *ethapi // Test for GetTransactionByBlockNumberAndIndex func testGetTransactionByBlockNumberAndIndex(t *testing.T, publicTransactionPoolAPI *ethapi.TransactionAPI) { // check 1 : False ( no transaction ) - tx := publicTransactionPoolAPI.GetTransactionByBlockNumberAndIndex(context.Background(), rpc.BlockNumber(1), 0) + tx, _ := publicTransactionPoolAPI.GetTransactionByBlockNumberAndIndex(context.Background(), rpc.BlockNumber(1), 0) assert.Nil(t, tx) // check 2 : Normal Transaction - tx = publicTransactionPoolAPI.GetTransactionByBlockNumberAndIndex(context.Background(), rpc.BlockNumber(2), 0) + tx, _ = publicTransactionPoolAPI.GetTransactionByBlockNumberAndIndex(context.Background(), rpc.BlockNumber(2), 0) assert.Equal(t, common.HexToAddress("0x24"), *tx.To) // check 3 : Normal Transaction - tx = publicTransactionPoolAPI.GetTransactionByBlockNumberAndIndex(context.Background(), rpc.BlockNumber(3), 0) + tx, _ = publicTransactionPoolAPI.GetTransactionByBlockNumberAndIndex(context.Background(), rpc.BlockNumber(3), 0) assert.Equal(t, common.HexToAddress("0x992"), *tx.To) // check 4 : Normal Transaction - tx = publicTransactionPoolAPI.GetTransactionByBlockNumberAndIndex(context.Background(), rpc.BlockNumber(3), 1) + tx, _ = publicTransactionPoolAPI.GetTransactionByBlockNumberAndIndex(context.Background(), rpc.BlockNumber(3), 1) assert.Equal(t, common.HexToAddress("0x993"), *tx.To) // check 5 : Normal Transaction - tx = publicTransactionPoolAPI.GetTransactionByBlockNumberAndIndex(context.Background(), rpc.BlockNumber(4), 0) + tx, _ = publicTransactionPoolAPI.GetTransactionByBlockNumberAndIndex(context.Background(), rpc.BlockNumber(4), 0) assert.Equal(t, common.HexToAddress("0x1000"), *tx.To) // check 5 : State Sync Transaction - tx = publicTransactionPoolAPI.GetTransactionByBlockNumberAndIndex(context.Background(), rpc.BlockNumber(4), 1) + tx, _ = publicTransactionPoolAPI.GetTransactionByBlockNumberAndIndex(context.Background(), rpc.BlockNumber(4), 1) assert.Equal(t, common.HexToAddress("0x0"), *tx.To) }