diff options
Diffstat (limited to 'core/tx_pool.go')
-rw-r--r-- | core/tx_pool.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/tx_pool.go b/core/tx_pool.go index 1719b4b4e..e7dbab0d2 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -429,6 +429,14 @@ func (pool *TxPool) reset(oldHead, newHead *types.Header) { pool.promoteExecutables(nil) } +// Reset only for testing. +func (pool *TxPool) Reset(newHead *types.Header) { + pool.mu.Lock() + defer pool.mu.Unlock() + + pool.reset(nil, newHead) +} + // Stop terminates the transaction pool. func (pool *TxPool) Stop() { // Unsubscribe all subscriptions registered from txpool |