mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert "core/txpool: fix minor flaw in isGapped check (#27404)"
This reverts commit 210e688a5c.
This commit is contained in:
parent
8f7eac56c9
commit
812add178e
1 changed files with 3 additions and 5 deletions
|
|
@ -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.
|
// isGapped reports whether the given transaction is immediately executable.
|
||||||
func (pool *TxPool) isGapped(from common.Address, tx *types.Transaction) bool {
|
func (pool *TxPool) isGapped(from common.Address, tx *types.Transaction) bool {
|
||||||
// Short circuit if transaction falls within the scope of the pending list
|
// Short circuit if transaction matches pending nonce and can be promoted
|
||||||
// or matches the next pending nonce which can be promoted as an executable
|
// to pending list as an executable transaction.
|
||||||
// transaction afterwards. Note, the tx staleness is already checked in
|
|
||||||
// 'validateTx' function previously.
|
|
||||||
next := pool.pendingNonces.get(from)
|
next := pool.pendingNonces.get(from)
|
||||||
if tx.Nonce() <= next {
|
if tx.Nonce() == next {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// The transaction has a nonce gap with pending list, it's only considered
|
// The transaction has a nonce gap with pending list, it's only considered
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue