Skip to content

Commit

Permalink
init pool with specified size, to avoid resizing when pool grows or s…
Browse files Browse the repository at this point in the history
…hrinks
  • Loading branch information
andyzhang2023 committed Apr 22, 2024
1 parent a89f3eb commit 579024f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/txpool/legacypool/legacypool.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ func New(config Config, chain BlockChain) *LegacyPool {
chain: chain,
chainconfig: chain.Config(),
signer: types.LatestSigner(chain.Config()),
pending: make(map[common.Address]*list),
queue: make(map[common.Address]*list),
pending: make(map[common.Address]*list, config.GlobalSlots),
queue: make(map[common.Address]*list, config.GlobalQueue),
beats: make(map[common.Address]time.Time),
all: newLookup(),
reqResetCh: make(chan *txpoolResetRequest),
Expand Down

0 comments on commit 579024f

Please sign in to comment.