miner: initialize maps with capacity (#27228)

* miner : initialize maps with known size

* miner:some reverts
pull/27230/head
ucwong 2 years ago committed by GitHub
parent 5021d36d35
commit c798507642
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      miner/worker.go

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

Loading…
Cancel
Save