mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-19 14:29:27 +00:00
core: only change the nonce if the account nonce is lower
This commit is contained in:
parent
2bb0e48a7b
commit
cf5ad266f6
1 changed files with 3 additions and 1 deletions
|
|
@ -69,7 +69,9 @@ func (pool *TxPool) Start() {
|
||||||
|
|
||||||
for _, tx := range pool.pending {
|
for _, tx := range pool.pending {
|
||||||
if addr, err := tx.From(); err == nil {
|
if addr, err := tx.From(); err == nil {
|
||||||
pool.state.SetNonce(addr, tx.Nonce())
|
if pool.state.GetNonce(addr) < tx.Nonce() {
|
||||||
|
pool.state.SetNonce(addr, tx.Nonce())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue