From 812add178ef66422a87d8d8685a33e55fb149ddd Mon Sep 17 00:00:00 2001 From: devopsbo3 <69951731+devopsbo3@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:27:53 -0600 Subject: [PATCH] Revert "core/txpool: fix minor flaw in isGapped check (#27404)" This reverts commit 210e688a5c1a6be577c2e6715234be36ed0ad79a. --- core/txpool/txpool.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index ba71dfa88a..cbb8cc287a 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -823,12 +823,10 @@ func (pool *TxPool) add(tx *types.Transaction, local bool) (replaced bool, err e // isGapped reports whether the given transaction is immediately executable. func (pool *TxPool) isGapped(from common.Address, tx *types.Transaction) bool { - // Short circuit if transaction falls within the scope of the pending list - // or matches the next pending nonce which can be promoted as an executable - // transaction afterwards. Note, the tx staleness is already checked in - // 'validateTx' function previously. + // Short circuit if transaction matches pending nonce and can be promoted + // to pending list as an executable transaction. next := pool.pendingNonces.get(from) - if tx.Nonce() <= next { + if tx.Nonce() == next { return false } // The transaction has a nonce gap with pending list, it's only considered