From b0dca36282e74b6f7d77948ce4b33c3cd4719d5f Mon Sep 17 00:00:00 2001 From: Krish Date: Mon, 9 Sep 2024 10:53:29 +0800 Subject: [PATCH] fix ut --- miner/miner_test.go | 4 ++++ miner/worker_test.go | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/miner/miner_test.go b/miner/miner_test.go index 411d6026ce..24c626d12b 100644 --- a/miner/miner_test.go +++ b/miner/miner_test.go @@ -59,6 +59,10 @@ func (m *mockBackend) TxPool() *txpool.TxPool { return m.txPool } +func (m *mockBackend) Downloader() *downloader.Downloader { + return nil +} + func (m *mockBackend) StateAtBlock(block *types.Block, reexec uint64, base *state.StateDB, checkLive bool, preferDisk bool) (statedb *state.StateDB, err error) { return nil, errors.New("not supported") } diff --git a/miner/worker_test.go b/miner/worker_test.go index aa05565301..c84a03cd01 100644 --- a/miner/worker_test.go +++ b/miner/worker_test.go @@ -34,6 +34,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/eth/downloader" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/params" @@ -144,8 +145,9 @@ func newTestWorkerBackend(t *testing.T, chainConfig *params.ChainConfig, engine } } -func (b *testWorkerBackend) BlockChain() *core.BlockChain { return b.chain } -func (b *testWorkerBackend) TxPool() *txpool.TxPool { return b.txPool } +func (b *testWorkerBackend) BlockChain() *core.BlockChain { return b.chain } +func (b *testWorkerBackend) TxPool() *txpool.TxPool { return b.txPool } +func (b *testWorkerBackend) Downloader() *downloader.Downloader { return nil } func (b *testWorkerBackend) newRandomTx(creation bool) *types.Transaction { var tx *types.Transaction