aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorcui <523516579@qq.com>2018-03-03 18:09:36 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-03-07 16:07:50 +0800
commitf8601430fddfe44b9c1781957ab13578cf17ad9f (patch)
tree6f57afc2091c9608b8928f1de3ff18ac65020e4e /core
parentf1d440a437908320452a077b443f03a6c9606dc0 (diff)
downloaddexon-f8601430fddfe44b9c1781957ab13578cf17ad9f.tar.gz
dexon-f8601430fddfe44b9c1781957ab13578cf17ad9f.tar.zst
dexon-f8601430fddfe44b9c1781957ab13578cf17ad9f.zip
core: should enqueue the invalids tx anyway
even the pending is empty we shoud enqueue the invalid txs
Diffstat (limited to 'core')
-rw-r--r--core/tx_pool.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/tx_pool.go b/core/tx_pool.go
index 0534fe57a..7d7ed334a 100644
--- a/core/tx_pool.go
+++ b/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)