Skip to content

Commit c4a8b4c

Browse files
weiihannholiman
authored andcommitted
core/txpool/legacypool: use uint256.Int instead of big.Int (ethereum#28606)
This change makes the legacy transaction pool use of `uint256.Int` instead of `big.Int`. The changes are made primarily only on the internal functions of legacypool. --------- Co-authored-by: Martin Holst Swende <[email protected]>
1 parent 0d95f41 commit c4a8b4c

13 files changed

+91
-65
lines changed

core/txpool/blobpool/blobpool.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ func (p *BlobPool) Filter(tx *types.Transaction) bool {
342342
// Init sets the gas price needed to keep a transaction in the pool and the chain
343343
// head to allow balance / nonce checks. The transaction journal will be loaded
344344
// from disk and filtered based on the provided starting settings.
345-
func (p *BlobPool) Init(gasTip *big.Int, head *types.Header, reserve txpool.AddressReserver) error {
345+
func (p *BlobPool) Init(gasTip uint64, head *types.Header, reserve txpool.AddressReserver) error {
346346
p.reserve = reserve
347347

348348
var (
@@ -420,7 +420,7 @@ func (p *BlobPool) Init(gasTip *big.Int, head *types.Header, reserve txpool.Addr
420420
basefeeGauge.Update(int64(basefee.Uint64()))
421421
blobfeeGauge.Update(int64(blobfee.Uint64()))
422422

423-
p.SetGasTip(gasTip)
423+
p.SetGasTip(new(big.Int).SetUint64(gasTip))
424424

425425
// Since the user might have modified their pool's capacity, evict anything
426426
// above the current allowance

core/txpool/blobpool/blobpool_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ func TestOpenDrops(t *testing.T) {
567567
statedb: statedb,
568568
}
569569
pool := New(Config{Datadir: storage}, chain)
570-
if err := pool.Init(big.NewInt(1), chain.CurrentBlock(), makeAddressReserver()); err != nil {
570+
if err := pool.Init(1, chain.CurrentBlock(), makeAddressReserver()); err != nil {
571571
t.Fatalf("failed to create blob pool: %v", err)
572572
}
573573
defer pool.Close()
@@ -686,7 +686,7 @@ func TestOpenIndex(t *testing.T) {
686686
statedb: statedb,
687687
}
688688
pool := New(Config{Datadir: storage}, chain)
689-
if err := pool.Init(big.NewInt(1), chain.CurrentBlock(), makeAddressReserver()); err != nil {
689+
if err := pool.Init(1, chain.CurrentBlock(), makeAddressReserver()); err != nil {
690690
t.Fatalf("failed to create blob pool: %v", err)
691691
}
692692
defer pool.Close()
@@ -788,7 +788,7 @@ func TestOpenHeap(t *testing.T) {
788788
statedb: statedb,
789789
}
790790
pool := New(Config{Datadir: storage}, chain)
791-
if err := pool.Init(big.NewInt(1), chain.CurrentBlock(), makeAddressReserver()); err != nil {
791+
if err := pool.Init(1, chain.CurrentBlock(), makeAddressReserver()); err != nil {
792792
t.Fatalf("failed to create blob pool: %v", err)
793793
}
794794
defer pool.Close()
@@ -868,7 +868,7 @@ func TestOpenCap(t *testing.T) {
868868
statedb: statedb,
869869
}
870870
pool := New(Config{Datadir: storage, Datacap: datacap}, chain)
871-
if err := pool.Init(big.NewInt(1), chain.CurrentBlock(), makeAddressReserver()); err != nil {
871+
if err := pool.Init(1, chain.CurrentBlock(), makeAddressReserver()); err != nil {
872872
t.Fatalf("failed to create blob pool: %v", err)
873873
}
874874
// Verify that enough transactions have been dropped to get the pool's size
@@ -1270,7 +1270,7 @@ func TestAdd(t *testing.T) {
12701270
statedb: statedb,
12711271
}
12721272
pool := New(Config{Datadir: storage}, chain)
1273-
if err := pool.Init(big.NewInt(1), chain.CurrentBlock(), makeAddressReserver()); err != nil {
1273+
if err := pool.Init(1, chain.CurrentBlock(), makeAddressReserver()); err != nil {
12741274
t.Fatalf("test %d: failed to create blob pool: %v", i, err)
12751275
}
12761276
verifyPoolInternals(t, pool)

core/txpool/legacypool/legacypool.go

+16-13
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import (
3737
"github.com/ethereum/go-ethereum/log"
3838
"github.com/ethereum/go-ethereum/metrics"
3939
"github.com/ethereum/go-ethereum/params"
40+
"github.com/holiman/uint256"
4041
)
4142

4243
const (
@@ -202,7 +203,7 @@ type LegacyPool struct {
202203
config Config
203204
chainconfig *params.ChainConfig
204205
chain BlockChain
205-
gasTip atomic.Pointer[big.Int]
206+
gasTip atomic.Pointer[uint256.Int]
206207
txFeed event.Feed
207208
signer types.Signer
208209
mu sync.RWMutex
@@ -287,12 +288,12 @@ func (pool *LegacyPool) Filter(tx *types.Transaction) bool {
287288
// head to allow balance / nonce checks. The transaction journal will be loaded
288289
// from disk and filtered based on the provided starting settings. The internal
289290
// goroutines will be spun up and the pool deemed operational afterwards.
290-
func (pool *LegacyPool) Init(gasTip *big.Int, head *types.Header, reserve txpool.AddressReserver) error {
291+
func (pool *LegacyPool) Init(gasTip uint64, head *types.Header, reserve txpool.AddressReserver) error {
291292
// Set the address reserver to request exclusive access to pooled accounts
292293
pool.reserve = reserve
293294

294295
// Set the basic pool parameters
295-
pool.gasTip.Store(gasTip)
296+
pool.gasTip.Store(uint256.NewInt(gasTip))
296297

297298
// Initialize the state with head block, or fallback to empty one in
298299
// case the head state is not available(might occur when node is not
@@ -433,19 +434,21 @@ func (pool *LegacyPool) SetGasTip(tip *big.Int) {
433434
pool.mu.Lock()
434435
defer pool.mu.Unlock()
435436

436-
old := pool.gasTip.Load()
437-
pool.gasTip.Store(new(big.Int).Set(tip))
438-
437+
var (
438+
newTip = uint256.MustFromBig(tip)
439+
old = pool.gasTip.Load()
440+
)
441+
pool.gasTip.Store(newTip)
439442
// If the min miner fee increased, remove transactions below the new threshold
440-
if tip.Cmp(old) > 0 {
443+
if newTip.Cmp(old) > 0 {
441444
// pool.priced is sorted by GasFeeCap, so we have to iterate through pool.all instead
442445
drop := pool.all.RemotesBelowTip(tip)
443446
for _, tx := range drop {
444447
pool.removeTx(tx.Hash(), false, true)
445448
}
446449
pool.priced.Removed(len(drop))
447450
}
448-
log.Info("Legacy pool tip threshold updated", "tip", tip)
451+
log.Info("Legacy pool tip threshold updated", "tip", newTip)
449452
}
450453

451454
// Nonce returns the next nonce of an account, with all transactions executable
@@ -532,7 +535,7 @@ func (pool *LegacyPool) Pending(enforceTips bool) map[common.Address][]*txpool.L
532535
// If the miner requests tip enforcement, cap the lists now
533536
if enforceTips && !pool.locals.contains(addr) {
534537
for i, tx := range txs {
535-
if tx.EffectiveGasTipIntCmp(pool.gasTip.Load(), pool.priced.urgent.baseFee) < 0 {
538+
if tx.EffectiveGasTipIntCmp(pool.gasTip.Load().ToBig(), pool.priced.urgent.baseFee) < 0 {
536539
txs = txs[:i]
537540
break
538541
}
@@ -594,7 +597,7 @@ func (pool *LegacyPool) validateTxBasics(tx *types.Transaction, local bool) erro
594597
1<<types.AccessListTxType |
595598
1<<types.DynamicFeeTxType,
596599
MaxSize: txMaxSize,
597-
MinTip: pool.gasTip.Load(),
600+
MinTip: pool.gasTip.Load().ToBig(),
598601
}
599602
if local {
600603
opts.MinTip = new(big.Int)
@@ -624,7 +627,7 @@ func (pool *LegacyPool) validateTx(tx *types.Transaction, local bool) error {
624627
},
625628
ExistingExpenditure: func(addr common.Address) *big.Int {
626629
if list := pool.pending[addr]; list != nil {
627-
return list.totalcost
630+
return list.totalcost.ToBig()
628631
}
629632
return new(big.Int)
630633
},
@@ -1441,7 +1444,7 @@ func (pool *LegacyPool) promoteExecutables(accounts []common.Address) []*types.T
14411444
}
14421445
log.Trace("Removed old queued transactions", "count", len(forwards))
14431446
// Drop all transactions that are too costly (low balance or out of gas)
1444-
drops, _ := list.Filter(pool.currentState.GetBalance(addr).ToBig(), gasLimit)
1447+
drops, _ := list.Filter(pool.currentState.GetBalance(addr), gasLimit)
14451448
for _, tx := range drops {
14461449
hash := tx.Hash()
14471450
pool.all.Remove(hash)
@@ -1642,7 +1645,7 @@ func (pool *LegacyPool) demoteUnexecutables() {
16421645
log.Trace("Removed old pending transaction", "hash", hash)
16431646
}
16441647
// Drop all transactions that are too costly (low balance or out of gas), and queue any invalids back for later
1645-
drops, invalids := list.Filter(pool.currentState.GetBalance(addr).ToBig(), gasLimit)
1648+
drops, invalids := list.Filter(pool.currentState.GetBalance(addr), gasLimit)
16461649
for _, tx := range drops {
16471650
hash := tx.Hash()
16481651
log.Trace("Removed unpayable pending transaction", "hash", hash)

core/txpool/legacypool/legacypool2_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func TestTransactionFutureAttack(t *testing.T) {
8585
config.GlobalQueue = 100
8686
config.GlobalSlots = 100
8787
pool := New(config, blockchain)
88-
pool.Init(new(big.Int).SetUint64(config.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
88+
pool.Init(config.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
8989
defer pool.Close()
9090
fillPool(t, pool)
9191
pending, _ := pool.Stats()
@@ -119,7 +119,7 @@ func TestTransactionFuture1559(t *testing.T) {
119119
statedb, _ := state.New(types.EmptyRootHash, state.NewDatabase(rawdb.NewMemoryDatabase()), nil)
120120
blockchain := newTestBlockChain(eip1559Config, 1000000, statedb, new(event.Feed))
121121
pool := New(testTxPoolConfig, blockchain)
122-
pool.Init(new(big.Int).SetUint64(testTxPoolConfig.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
122+
pool.Init(testTxPoolConfig.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
123123
defer pool.Close()
124124

125125
// Create a number of test accounts, fund them and make transactions
@@ -152,7 +152,7 @@ func TestTransactionZAttack(t *testing.T) {
152152
statedb, _ := state.New(types.EmptyRootHash, state.NewDatabase(rawdb.NewMemoryDatabase()), nil)
153153
blockchain := newTestBlockChain(eip1559Config, 1000000, statedb, new(event.Feed))
154154
pool := New(testTxPoolConfig, blockchain)
155-
pool.Init(new(big.Int).SetUint64(testTxPoolConfig.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
155+
pool.Init(testTxPoolConfig.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
156156
defer pool.Close()
157157
// Create a number of test accounts, fund them and make transactions
158158
fillPool(t, pool)
@@ -223,7 +223,7 @@ func BenchmarkFutureAttack(b *testing.B) {
223223
config.GlobalQueue = 100
224224
config.GlobalSlots = 100
225225
pool := New(config, blockchain)
226-
pool.Init(new(big.Int).SetUint64(testTxPoolConfig.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
226+
pool.Init(testTxPoolConfig.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
227227
defer pool.Close()
228228
fillPool(b, pool)
229229

core/txpool/legacypool/legacypool_test.go

+20-23
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func setupPoolWithConfig(config *params.ChainConfig) (*LegacyPool, *ecdsa.Privat
164164

165165
key, _ := crypto.GenerateKey()
166166
pool := New(testTxPoolConfig, blockchain)
167-
if err := pool.Init(new(big.Int).SetUint64(testTxPoolConfig.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver()); err != nil {
167+
if err := pool.Init(testTxPoolConfig.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver()); err != nil {
168168
panic(err)
169169
}
170170
// wait for the pool to initialize
@@ -199,9 +199,6 @@ func validatePoolInternals(pool *LegacyPool) error {
199199
if nonce := pool.pendingNonces.get(addr); nonce != last+1 {
200200
return fmt.Errorf("pending nonce mismatch: have %v, want %v", nonce, last+1)
201201
}
202-
if txs.totalcost.Cmp(common.Big0) < 0 {
203-
return fmt.Errorf("totalcost went negative: %v", txs.totalcost)
204-
}
205202
}
206203
return nil
207204
}
@@ -283,7 +280,7 @@ func TestStateChangeDuringReset(t *testing.T) {
283280
tx1 := transaction(1, 100000, key)
284281

285282
pool := New(testTxPoolConfig, blockchain)
286-
pool.Init(new(big.Int).SetUint64(testTxPoolConfig.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
283+
pool.Init(testTxPoolConfig.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
287284
defer pool.Close()
288285

289286
nonce := pool.Nonce(address)
@@ -349,7 +346,7 @@ func TestInvalidTransactions(t *testing.T) {
349346
}
350347

351348
tx = transaction(1, 100000, key)
352-
pool.gasTip.Store(big.NewInt(1000))
349+
pool.gasTip.Store(uint256.NewInt(1000))
353350
if err, want := pool.addRemote(tx), txpool.ErrUnderpriced; !errors.Is(err, want) {
354351
t.Errorf("want %v have %v", want, err)
355352
}
@@ -703,7 +700,7 @@ func TestPostponing(t *testing.T) {
703700
blockchain := newTestBlockChain(params.TestChainConfig, 1000000, statedb, new(event.Feed))
704701

705702
pool := New(testTxPoolConfig, blockchain)
706-
pool.Init(new(big.Int).SetUint64(testTxPoolConfig.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
703+
pool.Init(testTxPoolConfig.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
707704
defer pool.Close()
708705

709706
// Create two test accounts to produce different gap profiles with
@@ -920,7 +917,7 @@ func testQueueGlobalLimiting(t *testing.T, nolocals bool) {
920917
config.GlobalQueue = config.AccountQueue*3 - 1 // reduce the queue limits to shorten test time (-1 to make it non divisible)
921918

922919
pool := New(config, blockchain)
923-
pool.Init(new(big.Int).SetUint64(testTxPoolConfig.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
920+
pool.Init(testTxPoolConfig.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
924921
defer pool.Close()
925922

926923
// Create a number of test accounts and fund them (last one will be the local)
@@ -1013,7 +1010,7 @@ func testQueueTimeLimiting(t *testing.T, nolocals bool) {
10131010
config.NoLocals = nolocals
10141011

10151012
pool := New(config, blockchain)
1016-
pool.Init(new(big.Int).SetUint64(config.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
1013+
pool.Init(config.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
10171014
defer pool.Close()
10181015

10191016
// Create two test accounts to ensure remotes expire but locals do not
@@ -1198,7 +1195,7 @@ func TestPendingGlobalLimiting(t *testing.T) {
11981195
config.GlobalSlots = config.AccountSlots * 10
11991196

12001197
pool := New(config, blockchain)
1201-
pool.Init(new(big.Int).SetUint64(config.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
1198+
pool.Init(config.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
12021199
defer pool.Close()
12031200

12041201
// Create a number of test accounts and fund them
@@ -1302,7 +1299,7 @@ func TestCapClearsFromAll(t *testing.T) {
13021299
config.GlobalSlots = 8
13031300

13041301
pool := New(config, blockchain)
1305-
pool.Init(new(big.Int).SetUint64(config.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
1302+
pool.Init(config.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
13061303
defer pool.Close()
13071304

13081305
// Create a number of test accounts and fund them
@@ -1335,7 +1332,7 @@ func TestPendingMinimumAllowance(t *testing.T) {
13351332
config.GlobalSlots = 1
13361333

13371334
pool := New(config, blockchain)
1338-
pool.Init(new(big.Int).SetUint64(config.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
1335+
pool.Init(config.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
13391336
defer pool.Close()
13401337

13411338
// Create a number of test accounts and fund them
@@ -1381,7 +1378,7 @@ func TestRepricing(t *testing.T) {
13811378
blockchain := newTestBlockChain(params.TestChainConfig, 1000000, statedb, new(event.Feed))
13821379

13831380
pool := New(testTxPoolConfig, blockchain)
1384-
pool.Init(new(big.Int).SetUint64(testTxPoolConfig.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
1381+
pool.Init(testTxPoolConfig.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
13851382
defer pool.Close()
13861383

13871384
// Keep track of transaction events to ensure all executables get announced
@@ -1503,7 +1500,7 @@ func TestMinGasPriceEnforced(t *testing.T) {
15031500
txPoolConfig := DefaultConfig
15041501
txPoolConfig.NoLocals = true
15051502
pool := New(txPoolConfig, blockchain)
1506-
pool.Init(new(big.Int).SetUint64(txPoolConfig.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
1503+
pool.Init(txPoolConfig.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
15071504
defer pool.Close()
15081505

15091506
key, _ := crypto.GenerateKey()
@@ -1674,7 +1671,7 @@ func TestRepricingKeepsLocals(t *testing.T) {
16741671
blockchain := newTestBlockChain(eip1559Config, 1000000, statedb, new(event.Feed))
16751672

16761673
pool := New(testTxPoolConfig, blockchain)
1677-
pool.Init(new(big.Int).SetUint64(testTxPoolConfig.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
1674+
pool.Init(testTxPoolConfig.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
16781675
defer pool.Close()
16791676

16801677
// Create a number of test accounts and fund them
@@ -1752,7 +1749,7 @@ func TestUnderpricing(t *testing.T) {
17521749
config.GlobalQueue = 2
17531750

17541751
pool := New(config, blockchain)
1755-
pool.Init(new(big.Int).SetUint64(config.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
1752+
pool.Init(config.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
17561753
defer pool.Close()
17571754

17581755
// Keep track of transaction events to ensure all executables get announced
@@ -1867,7 +1864,7 @@ func TestStableUnderpricing(t *testing.T) {
18671864
config.GlobalQueue = 0
18681865

18691866
pool := New(config, blockchain)
1870-
pool.Init(new(big.Int).SetUint64(config.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
1867+
pool.Init(config.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
18711868
defer pool.Close()
18721869

18731870
// Keep track of transaction events to ensure all executables get announced
@@ -2096,7 +2093,7 @@ func TestDeduplication(t *testing.T) {
20962093
blockchain := newTestBlockChain(params.TestChainConfig, 1000000, statedb, new(event.Feed))
20972094

20982095
pool := New(testTxPoolConfig, blockchain)
2099-
pool.Init(new(big.Int).SetUint64(testTxPoolConfig.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
2096+
pool.Init(testTxPoolConfig.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
21002097
defer pool.Close()
21012098

21022099
// Create a test account to add transactions with
@@ -2163,7 +2160,7 @@ func TestReplacement(t *testing.T) {
21632160
blockchain := newTestBlockChain(params.TestChainConfig, 1000000, statedb, new(event.Feed))
21642161

21652162
pool := New(testTxPoolConfig, blockchain)
2166-
pool.Init(new(big.Int).SetUint64(testTxPoolConfig.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
2163+
pool.Init(testTxPoolConfig.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
21672164
defer pool.Close()
21682165

21692166
// Keep track of transaction events to ensure all executables get announced
@@ -2374,7 +2371,7 @@ func testJournaling(t *testing.T, nolocals bool) {
23742371
config.Rejournal = time.Second
23752372

23762373
pool := New(config, blockchain)
2377-
pool.Init(new(big.Int).SetUint64(config.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
2374+
pool.Init(config.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
23782375

23792376
// Create two test accounts to ensure remotes expire but locals do not
23802377
local, _ := crypto.GenerateKey()
@@ -2412,7 +2409,7 @@ func testJournaling(t *testing.T, nolocals bool) {
24122409
blockchain = newTestBlockChain(params.TestChainConfig, 1000000, statedb, new(event.Feed))
24132410

24142411
pool = New(config, blockchain)
2415-
pool.Init(new(big.Int).SetUint64(config.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
2412+
pool.Init(config.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
24162413

24172414
pending, queued = pool.Stats()
24182415
if queued != 0 {
@@ -2439,7 +2436,7 @@ func testJournaling(t *testing.T, nolocals bool) {
24392436
statedb.SetNonce(crypto.PubkeyToAddress(local.PublicKey), 1)
24402437
blockchain = newTestBlockChain(params.TestChainConfig, 1000000, statedb, new(event.Feed))
24412438
pool = New(config, blockchain)
2442-
pool.Init(new(big.Int).SetUint64(config.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
2439+
pool.Init(config.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
24432440

24442441
pending, queued = pool.Stats()
24452442
if pending != 0 {
@@ -2470,7 +2467,7 @@ func TestStatusCheck(t *testing.T) {
24702467
blockchain := newTestBlockChain(params.TestChainConfig, 1000000, statedb, new(event.Feed))
24712468

24722469
pool := New(testTxPoolConfig, blockchain)
2473-
pool.Init(new(big.Int).SetUint64(testTxPoolConfig.PriceLimit), blockchain.CurrentBlock(), makeAddressReserver())
2470+
pool.Init(testTxPoolConfig.PriceLimit, blockchain.CurrentBlock(), makeAddressReserver())
24742471
defer pool.Close()
24752472

24762473
// Create the test accounts to check various transaction statuses with

0 commit comments

Comments
 (0)