[core] Refresh acc timeout beat each time a tx is added (#3331)

Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
pull/3332/head
Daniel Van Der Maden 4 years ago committed by GitHub
parent 23fc4486ae
commit 3aaccf8c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      core/tx_pool.go

@ -967,6 +967,9 @@ func (pool *TxPool) add(tx types.PoolTransaction, local bool) (bool, error) {
pool.priced.Put(tx) pool.priced.Put(tx)
pool.journalTx(from, tx) pool.journalTx(from, tx)
// Set or refresh beat for account timeout eviction
pool.beats[from] = time.Now()
logger.Info(). logger.Info().
Str("hash", tx.Hash().Hex()). Str("hash", tx.Hash().Hex()).
Interface("from", from). Interface("from", from).
@ -993,6 +996,9 @@ func (pool *TxPool) add(tx types.PoolTransaction, local bool) (bool, error) {
} }
pool.journalTx(from, tx) pool.journalTx(from, tx)
// Set or refresh beat for account timeout eviction
pool.beats[from] = time.Now()
logger.Info(). logger.Info().
Str("hash", hash.Hex()). Str("hash", hash.Hex()).
Interface("from", from). Interface("from", from).

Loading…
Cancel
Save