core/txpool : fix map size avoid resizing (#27221)

This commit is contained in:
ucwong authored and GitHub committed 2023-05-05 12:33:01 +03:00
1 parent 79a57d49cb
commit ba09403113
1 file changed
+1 -1
+1 -1
View File
@@ -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()