From 1781196ad4909b010707b41a75019e6d6d4f14c6 Mon Sep 17 00:00:00 2001 From: alex017 Date: Fri, 9 Jan 2026 18:17:32 +0100 Subject: [PATCH] Update tx_tracker_test.go --- core/txpool/locals/tx_tracker_test.go | 36 --------------------------- 1 file changed, 36 deletions(-) diff --git a/core/txpool/locals/tx_tracker_test.go b/core/txpool/locals/tx_tracker_test.go index dde8754605..d5ca5a2228 100644 --- a/core/txpool/locals/tx_tracker_test.go +++ b/core/txpool/locals/tx_tracker_test.go @@ -93,25 +93,6 @@ func (env *testEnv) close() { env.chain.Stop() } -// nolint:unused -func (env *testEnv) setGasTip(gasTip uint64) { - env.pool.SetGasTip(new(big.Int).SetUint64(gasTip)) -} - -// nolint:unused -func (env *testEnv) makeTx(nonce uint64, gasPrice *big.Int) *types.Transaction { - if nonce == 0 { - head := env.chain.CurrentHeader() - state, _ := env.chain.StateAt(head.Root) - nonce = state.GetNonce(address) - } - if gasPrice == nil { - gasPrice = big.NewInt(params.GWei) - } - tx, _ := types.SignTx(types.NewTransaction(nonce, common.Address{0x00}, big.NewInt(1000), params.TxGas, gasPrice, nil), signer, key) - return tx -} - func (env *testEnv) makeTxs(n int) []*types.Transaction { head := env.chain.CurrentHeader() state, _ := env.chain.StateAt(head.Root) @@ -125,23 +106,6 @@ func (env *testEnv) makeTxs(n int) []*types.Transaction { return txs } -// nolint:unused -func (env *testEnv) commit() { - head := env.chain.CurrentBlock() - block := env.chain.GetBlock(head.Hash(), head.Number.Uint64()) - blocks, _ := core.GenerateChain(env.chain.Config(), block, ethash.NewFaker(), env.genDb, 1, func(i int, gen *core.BlockGen) { - tx, err := types.SignTx(types.NewTransaction(gen.TxNonce(address), common.Address{0x00}, big.NewInt(1000), params.TxGas, gen.BaseFee(), nil), signer, key) - if err != nil { - panic(err) - } - gen.AddTx(tx) - }) - env.chain.InsertChain(blocks) - if err := env.pool.Sync(); err != nil { - panic(err) - } -} - func TestResubmit(t *testing.T) { env := newTestEnv(t, 10, 0, "") defer env.close()