mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
core: use range loop for subpool iteration
This commit is contained in:
parent
86116f78fc
commit
2edc252993
1 changed files with 3 additions and 3 deletions
|
|
@ -334,9 +334,9 @@ func (p *TxPool) Add(txs []*types.Transaction, local bool, sync bool) []error {
|
|||
// Add the transactions split apart to the individual subpools and piece
|
||||
// back the errors into the original sort order.
|
||||
errsets := make([][]error, len(p.subpools))
|
||||
for i := 0; i < len(p.subpools); i++ {
|
||||
errsets[i] = p.subpools[i].Add(txsets[i], local, sync)
|
||||
}
|
||||
for i, subpool := range p.subpools {
|
||||
errsets[i] = subpool.Add(txsets[i], local, sync)
|
||||
}
|
||||
errs := make([]error, len(txs))
|
||||
for i, split := range splits {
|
||||
// If the transaction was rejected by all subpools, mark it unsupported
|
||||
|
|
|
|||
Loading…
Reference in a new issue