aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbojie <bojie@dexon.org>2018-12-12 22:27:19 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:54 +0800
commit002cabe12c347971e9d9d31f0f5759d5588431f0 (patch)
treeaebdce6493c93a58d5d8c185d798f0e47009da2d
parent705607110d1c8277cd9fc61e86d7657fb7e09754 (diff)
downloaddexon-002cabe12c347971e9d9d31f0f5759d5588431f0.tar
dexon-002cabe12c347971e9d9d31f0f5759d5588431f0.tar.gz
dexon-002cabe12c347971e9d9d31f0f5759d5588431f0.tar.bz2
dexon-002cabe12c347971e9d9d31f0f5759d5588431f0.tar.lz
dexon-002cabe12c347971e9d9d31f0f5759d5588431f0.tar.xz
dexon-002cabe12c347971e9d9d31f0f5759d5588431f0.tar.zst
dexon-002cabe12c347971e9d9d31f0f5759d5588431f0.zip
cache: prune cache correctly (#88)
-rw-r--r--core/tx_pool.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/tx_pool.go b/core/tx_pool.go
index 1d69ea506..ea2025cde 100644
--- a/core/tx_pool.go
+++ b/core/tx_pool.go
@@ -927,6 +927,7 @@ func (pool *TxPool) Get(hash common.Hash) *types.Transaction {
// removeTx removes a single transaction from the queue, moving all subsequent
// transactions back to the future queue.
func (pool *TxPool) removeTx(hash common.Hash, outofbound bool) {
+ types.GlobalSigCache.Prune([]common.Hash{hash})
// Fetch the transaction we wish to delete
tx := pool.all.Get(hash)
if tx == nil {
@@ -965,8 +966,6 @@ func (pool *TxPool) removeTx(hash common.Hash, outofbound bool) {
delete(pool.queue, addr)
}
}
-
- types.GlobalSigCache.Prune([]common.Hash{hash})
}
// promoteExecutables moves transactions that have become processable from the