miner: initialize maps with capacity (#27228)
* miner : initialize maps with known size * miner:some reverts
This commit is contained in:
parent
5021d36d35
commit
c798507642
@ -628,7 +628,7 @@ func (w *worker) mainLoop() {
|
|||||||
if gp := w.current.gasPool; gp != nil && gp.Gas() < params.TxGas {
|
if gp := w.current.gasPool; gp != nil && gp.Gas() < params.TxGas {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
txs := make(map[common.Address]types.Transactions)
|
txs := make(map[common.Address]types.Transactions, len(ev.Txs))
|
||||||
for _, tx := range ev.Txs {
|
for _, tx := range ev.Txs {
|
||||||
acc, _ := types.Sender(w.current.signer, tx)
|
acc, _ := types.Sender(w.current.signer, tx)
|
||||||
txs[acc] = append(txs[acc], tx)
|
txs[acc] = append(txs[acc], tx)
|
||||||
|
Loading…
Reference in New Issue
Block a user