mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-18 22:09:26 +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
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue