mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-22 11:31:02 +00:00
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 {
|
||||
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…
Reference in New Issue
Block a user