From c42f81f81bd8201d50109ef0f718bb1860299b70 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Wed, 12 Jul 2023 22:17:50 +0800 Subject: [PATCH] fix : TestBuildPayload --- miner/worker_test.go | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/miner/worker_test.go b/miner/worker_test.go index 3c51a32f9d..91cf052e25 100644 --- a/miner/worker_test.go +++ b/miner/worker_test.go @@ -35,7 +35,6 @@ import ( "github.com/ethereum/go-ethereum/consensus/ethash" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/rawdb" - "github.com/ethereum/go-ethereum/core/txpool" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/ethdb" @@ -45,39 +44,6 @@ import ( "github.com/ethereum/go-ethereum/tests/bor/mocks" ) -func init() { - testTxPoolConfig = txpool.DefaultConfig - testTxPoolConfig.Journal = "" - ethashChainConfig = new(params.ChainConfig) - *ethashChainConfig = *params.TestChainConfig - cliqueChainConfig = new(params.ChainConfig) - *cliqueChainConfig = *params.TestChainConfig - cliqueChainConfig.Clique = ¶ms.CliqueConfig{ - Period: 10, - Epoch: 30000, - } - - signer := types.LatestSigner(params.TestChainConfig) - tx1 := types.MustSignNewTx(testBankKey, signer, &types.AccessListTx{ - ChainID: params.TestChainConfig.ChainID, - Nonce: 0, - To: &testUserAddress, - Value: big.NewInt(1000), - Gas: params.TxGas, - GasPrice: big.NewInt(params.InitialBaseFee), - }) - pendingTxs = append(pendingTxs, tx1) - - tx2 := types.MustSignNewTx(testBankKey, signer, &types.LegacyTx{ - Nonce: 1, - To: &testUserAddress, - Value: big.NewInt(1000), - Gas: params.TxGas, - GasPrice: big.NewInt(params.InitialBaseFee), - }) - newTxs = append(newTxs, tx2) -} - // newTestWorker creates a new test worker with the given parameters. // nolint:unparam func newTestWorker(t TensingObject, chainConfig *params.ChainConfig, engine consensus.Engine, db ethdb.Database, blocks int, noempty bool, delay uint, opcodeDelay uint) (*worker, *testWorkerBackend, func()) {