From 3aaccf8c8190b6b137201395bf54d4d4e8a03280 Mon Sep 17 00:00:00 2001 From: Daniel Van Der Maden Date: Thu, 3 Sep 2020 20:39:25 -0700 Subject: [PATCH] [core] Refresh acc timeout beat each time a tx is added (#3331) Signed-off-by: Daniel Van Der Maden --- core/tx_pool.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/tx_pool.go b/core/tx_pool.go index 956d66d03..3f897e5bd 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -967,6 +967,9 @@ func (pool *TxPool) add(tx types.PoolTransaction, local bool) (bool, error) { pool.priced.Put(tx) pool.journalTx(from, tx) + // Set or refresh beat for account timeout eviction + pool.beats[from] = time.Now() + logger.Info(). Str("hash", tx.Hash().Hex()). Interface("from", from). @@ -993,6 +996,9 @@ func (pool *TxPool) add(tx types.PoolTransaction, local bool) (bool, error) { } pool.journalTx(from, tx) + // Set or refresh beat for account timeout eviction + pool.beats[from] = time.Now() + logger.Info(). Str("hash", hash.Hex()). Interface("from", from).