diff options
author | bojie <bojie@dexon.org> | 2018-12-12 22:27:19 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2018-12-19 20:54:27 +0800 |
commit | 62561c946386ebd334db0027888ab5c07de3ffe8 (patch) | |
tree | f95f7daccc7db36e0477e5dff4776f7ecbf22bf1 /core | |
parent | e901518852e17febb9bec5c25ae727d8ddd9f0ed (diff) | |
download | dexon-62561c946386ebd334db0027888ab5c07de3ffe8.tar dexon-62561c946386ebd334db0027888ab5c07de3ffe8.tar.gz dexon-62561c946386ebd334db0027888ab5c07de3ffe8.tar.bz2 dexon-62561c946386ebd334db0027888ab5c07de3ffe8.tar.lz dexon-62561c946386ebd334db0027888ab5c07de3ffe8.tar.xz dexon-62561c946386ebd334db0027888ab5c07de3ffe8.tar.zst dexon-62561c946386ebd334db0027888ab5c07de3ffe8.zip |
cache: prune cache correctly (#88)
Diffstat (limited to 'core')
-rw-r--r-- | core/tx_pool.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/tx_pool.go b/core/tx_pool.go index 2e8211208..626722d49 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -907,6 +907,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 { @@ -945,8 +946,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 |