@@ -257,16 +257,15 @@ type TxPool struct {
257
257
all * txLookup // All transactions to allow lookups
258
258
priced * txPricedList // All transactions sorted by price
259
259
260
- chainHeadCh chan ChainHeadEvent
261
- chainHeadSub event.Subscription
262
- reqResetCh chan * txpoolResetRequest
263
- reqPromoteCh chan * accountSet
264
- updateBlockchainCh chan blockChain
265
- queueTxEventCh chan * types.Transaction
266
- reorgDoneCh chan chan struct {}
267
- reorgShutdownCh chan struct {} // requests shutdown of scheduleReorgLoop
268
- wg sync.WaitGroup // tracks loop, scheduleReorgLoop
269
- initDoneCh chan struct {} // is closed once the pool is initialized (for tests)
260
+ chainHeadCh chan ChainHeadEvent
261
+ chainHeadSub event.Subscription
262
+ reqResetCh chan * txpoolResetRequest
263
+ reqPromoteCh chan * accountSet
264
+ queueTxEventCh chan * types.Transaction
265
+ reorgDoneCh chan chan struct {}
266
+ reorgShutdownCh chan struct {} // requests shutdown of scheduleReorgLoop
267
+ wg sync.WaitGroup // tracks loop, scheduleReorgLoop
268
+ initDoneCh chan struct {} // is closed once the pool is initialized (for tests)
270
269
271
270
changesSinceReorg int // A counter for how many drops we've performed in-between reorg.
272
271
}
@@ -283,23 +282,22 @@ func NewTxPool(config TxPoolConfig, chainconfig *params.ChainConfig, chain block
283
282
284
283
// Create the transaction pool with its initial settings
285
284
pool := & TxPool {
286
- config : config ,
287
- chainconfig : chainconfig ,
288
- chain : chain ,
289
- signer : types .LatestSigner (chainconfig ),
290
- pending : make (map [common.Address ]* txList ),
291
- queue : make (map [common.Address ]* txList ),
292
- beats : make (map [common.Address ]time.Time ),
293
- all : newTxLookup (),
294
- chainHeadCh : make (chan ChainHeadEvent , chainHeadChanSize ),
295
- reqResetCh : make (chan * txpoolResetRequest ),
296
- reqPromoteCh : make (chan * accountSet ),
297
- queueTxEventCh : make (chan * types.Transaction ),
298
- reorgDoneCh : make (chan chan struct {}),
299
- reorgShutdownCh : make (chan struct {}),
300
- updateBlockchainCh : make (chan blockChain ),
301
- initDoneCh : make (chan struct {}),
302
- gasPrice : new (big.Int ).SetUint64 (config .PriceLimit ),
285
+ config : config ,
286
+ chainconfig : chainconfig ,
287
+ chain : chain ,
288
+ signer : types .LatestSigner (chainconfig ),
289
+ pending : make (map [common.Address ]* txList ),
290
+ queue : make (map [common.Address ]* txList ),
291
+ beats : make (map [common.Address ]time.Time ),
292
+ all : newTxLookup (),
293
+ chainHeadCh : make (chan ChainHeadEvent , chainHeadChanSize ),
294
+ reqResetCh : make (chan * txpoolResetRequest ),
295
+ reqPromoteCh : make (chan * accountSet ),
296
+ queueTxEventCh : make (chan * types.Transaction ),
297
+ reorgDoneCh : make (chan chan struct {}),
298
+ reorgShutdownCh : make (chan struct {}),
299
+ initDoneCh : make (chan struct {}),
300
+ gasPrice : new (big.Int ).SetUint64 (config .PriceLimit ),
303
301
}
304
302
pool .locals = newAccountSet (pool .signer )
305
303
for _ , addr := range config .Locals {
0 commit comments