Skip to content

Commit

Permalink
Revert "core/txpool: fix minor flaw in isGapped check (ethereum#27404)"
Browse files Browse the repository at this point in the history
This reverts commit 210e688.
  • Loading branch information
devopsbo3 committed Nov 10, 2023
1 parent 8f7eac5 commit 812add1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions core/txpool/txpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 812add1

Please sign in to comment.