diff --git a/eth/tracers/api_test.go b/eth/tracers/api_test.go index 529448e397..6bb2416dbf 100644 --- a/eth/tracers/api_test.go +++ b/eth/tracers/api_test.go @@ -116,9 +116,13 @@ func (b *testBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumber) return b.chain.GetBlockByNumber(uint64(number)), nil } -func (b *testBackend) GetTransaction(ctx context.Context, txHash common.Hash) (bool, *types.Transaction, common.Hash, uint64, uint64, error) { +func (b *testBackend) GetTransaction(txHash common.Hash) (bool, *types.Transaction, common.Hash, uint64, uint64) { tx, hash, blockNumber, index := rawdb.ReadTransaction(b.chaindb, txHash) - return tx != nil, tx, hash, blockNumber, index, nil + return tx != nil, tx, hash, blockNumber, index +} + +func (b *testBackend) TxIndexDone(ctx context.Context) bool { + return true } func (b *testBackend) RPCGasCap() uint64 { diff --git a/internal/ethapi/api_test.go b/internal/ethapi/api_test.go index 93dc11064a..dc51e906de 100644 --- a/internal/ethapi/api_test.go +++ b/internal/ethapi/api_test.go @@ -591,9 +591,12 @@ func (b testBackend) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) even func (b testBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error { panic("implement me") } -func (b testBackend) GetTransaction(ctx context.Context, txHash common.Hash) (bool, *types.Transaction, common.Hash, uint64, uint64, error) { +func (b testBackend) GetTransaction(txHash common.Hash) (bool, *types.Transaction, common.Hash, uint64, uint64) { tx, blockHash, blockNumber, index := rawdb.ReadTransaction(b.db, txHash) - return true, tx, blockHash, blockNumber, index, nil + return true, tx, blockHash, blockNumber, index +} +func (b testBackend) TxIndexDone(ctx context.Context) bool { + return true } func (b testBackend) GetPoolTransactions() (types.Transactions, error) { panic("implement me") } func (b testBackend) GetPoolTransaction(txHash common.Hash) *types.Transaction { panic("implement me") }