Skip to content

Commit 8906d9c

Browse files
core: rebased on master
1 parent 1caff8f commit 8906d9c

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

core/tx_pool.go

+25-27
Original file line numberDiff line numberDiff line change
@@ -257,16 +257,15 @@ type TxPool struct {
257257
all *txLookup // All transactions to allow lookups
258258
priced *txPricedList // All transactions sorted by price
259259

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)
270269

271270
changesSinceReorg int // A counter for how many drops we've performed in-between reorg.
272271
}
@@ -283,23 +282,22 @@ func NewTxPool(config TxPoolConfig, chainconfig *params.ChainConfig, chain block
283282

284283
// Create the transaction pool with its initial settings
285284
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),
303301
}
304302
pool.locals = newAccountSet(pool.signer)
305303
for _, addr := range config.Locals {

0 commit comments

Comments
 (0)