Skip to content

Commit f860143

Browse files
cuiweixiekaralabe
authored andcommitted
core: should enqueue the invalids tx anyway
even the pending is empty we shoud enqueue the invalid txs
1 parent f1d440a commit f860143

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎core/tx_pool.go‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -881,12 +881,13 @@ func (pool *TxPool) removeTx(hash common.Hash) {
881881
if pending.Empty() {
882882
delete(pool.pending, addr)
883883
delete(pool.beats, addr)
884-
} else {
885-
// Otherwise postpone any invalidated transactions
886-
for _, tx := range invalids {
887-
pool.enqueueTx(tx.Hash(), tx)
888-
}
889884
}
885+
886+
// Otherwise postpone any invalidated transactions
887+
for _, tx := range invalids {
888+
pool.enqueueTx(tx.Hash(), tx)
889+
}
890+
890891
// Update the account nonce if needed
891892
if nonce := tx.Nonce(); pool.pendingState.GetNonce(addr) > nonce {
892893
pool.pendingState.SetNonce(addr, nonce)

0 commit comments

Comments
 (0)