mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +00:00
core/tx_pool: reduce judgement levels (#16980)
This commit is contained in:
parent
859308c03f
commit
5b883dee30
1 changed files with 3 additions and 5 deletions
|
|
@ -954,13 +954,11 @@ func (pool *TxPool) addTxsLocked(txs []*types.Transaction, local bool) []error {
|
||||||
|
|
||||||
for i, tx := range txs {
|
for i, tx := range txs {
|
||||||
var replace bool
|
var replace bool
|
||||||
if replace, errs[i] = pool.add(tx, local); errs[i] == nil {
|
if replace, errs[i] = pool.add(tx, local); errs[i] == nil && !replace {
|
||||||
if !replace {
|
|
||||||
from, _ := types.Sender(pool.signer, tx) // already validated
|
from, _ := types.Sender(pool.signer, tx) // already validated
|
||||||
dirty[from] = struct{}{}
|
dirty[from] = struct{}{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Only reprocess the internal state if something was actually added
|
// Only reprocess the internal state if something was actually added
|
||||||
if len(dirty) > 0 {
|
if len(dirty) > 0 {
|
||||||
addrs := make([]common.Address, 0, len(dirty))
|
addrs := make([]common.Address, 0, len(dirty))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue