core: should enqueue the invalids tx anyway

even the pending is empty we shoud enqueue the invalid txs
pull/16240/head
cui 7 years ago committed by Péter Szilágyi
parent f1d440a437
commit f8601430fd
No known key found for this signature in database
GPG Key ID: E9AE538CEDF8293D
  1. 11
      core/tx_pool.go

@ -881,12 +881,13 @@ func (pool *TxPool) removeTx(hash common.Hash) {
if pending.Empty() {
delete(pool.pending, addr)
delete(pool.beats, addr)
} else {
// Otherwise postpone any invalidated transactions
for _, tx := range invalids {
pool.enqueueTx(tx.Hash(), tx)
}
}
// Otherwise postpone any invalidated transactions
for _, tx := range invalids {
pool.enqueueTx(tx.Hash(), tx)
}
// Update the account nonce if needed
if nonce := tx.Nonce(); pool.pendingState.GetNonce(addr) > nonce {
pool.pendingState.SetNonce(addr, nonce)

Loading…
Cancel
Save