Unverified Commit c7985076 authored by ucwong's avatar ucwong Committed by GitHub

miner: initialize maps with capacity (#27228)

* miner : initialize maps with known size

* miner:some reverts
parent 5021d36d
......@@ -628,7 +628,7 @@ func (w *worker) mainLoop() {
if gp := w.current.gasPool; gp != nil && gp.Gas() < params.TxGas {
continue
}
txs := make(map[common.Address]types.Transactions)
txs := make(map[common.Address]types.Transactions, len(ev.Txs))
for _, tx := range ev.Txs {
acc, _ := types.Sender(w.current.signer, tx)
txs[acc] = append(txs[acc], tx)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment