From 2659e4a0e988046c9b9e1e209981c00d371f64a1 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Fri, 21 Feb 2025 10:55:24 +0800 Subject: [PATCH] core/txpool/legacypool: address comments from matt --- core/txpool/legacypool/legacypool.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index 07a4d70eb1..4250283b03 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -628,11 +628,9 @@ func (pool *LegacyPool) validateAuth(tx *types.Transaction) error { queue := pool.queue[from] if queue != nil { count += queue.Len() - if !exists { - exists = queue.Contains(tx.Nonce()) - } + exists = exists || queue.Contains(tx.Nonce()) } - // Replace the existing inflight transaction for delegated accounts + // Replace the existing in-flight transaction for delegated accounts // are still supported if count >= 1 && !exists { return ErrInflightTxLimitReached