From ba09403113b0c0549da116d58d99c8669aed7356 Mon Sep 17 00:00:00 2001 From: ucwong Date: Fri, 5 May 2023 03:33:01 -0600 Subject: [PATCH] core/txpool : fix map size avoid resizing (#27221) --- core/txpool/txpool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index 4928b5afc..056b1ebe8 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -549,7 +549,7 @@ func (pool *TxPool) Pending(enforceTips bool) map[common.Address]types.Transacti pool.mu.Lock() defer pool.mu.Unlock() - pending := make(map[common.Address]types.Transactions) + pending := make(map[common.Address]types.Transactions, len(pool.pending)) for addr, list := range pool.pending { txs := list.Flatten()