From 5d8800ff15319f0588b37959385a6e235cffd72e Mon Sep 17 00:00:00 2001 From: bojie Date: Wed, 12 Dec 2018 22:27:19 +0800 Subject: cache: prune cache correctly (#88) --- core/tx_pool.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core') 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 -- cgit v1.2.3