aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorbojie <bojie@dexon.org>2018-12-12 22:27:19 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:19 +0800
commitff5d1d96642ddbe6d30c02f477e1c2ff5bd85909 (patch)
treed98487cce64c689809c45c46c29f8a76f47527e5 /core
parent80fb00b32abc91b3348583085845233ff8d1b724 (diff)
downloadgo-tangerine-ff5d1d96642ddbe6d30c02f477e1c2ff5bd85909.tar
go-tangerine-ff5d1d96642ddbe6d30c02f477e1c2ff5bd85909.tar.gz
go-tangerine-ff5d1d96642ddbe6d30c02f477e1c2ff5bd85909.tar.bz2
go-tangerine-ff5d1d96642ddbe6d30c02f477e1c2ff5bd85909.tar.lz
go-tangerine-ff5d1d96642ddbe6d30c02f477e1c2ff5bd85909.tar.xz
go-tangerine-ff5d1d96642ddbe6d30c02f477e1c2ff5bd85909.tar.zst
go-tangerine-ff5d1d96642ddbe6d30c02f477e1c2ff5bd85909.zip
cache: prune cache correctly (#88)
Diffstat (limited to 'core')
-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