fix(taiko-geth): fix a mempool fetch issue (#333)

This commit is contained in:
maskpp 2024-10-22 18:09:31 +08:00 committed by GitHub
parent 3229807585
commit 1340ded381
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -294,10 +294,6 @@ loop:
txs.Shift() txs.Shift()
case errors.Is(err, nil): case errors.Is(err, nil):
// Everything ok, collect the logs and shift in the next transaction from the same account
env.tcount++
txs.Shift()
data, err := rlp.EncodeToBytes(env.txs) data, err := rlp.EncodeToBytes(env.txs)
if err != nil { if err != nil {
log.Trace("Failed to rlp encode the pending transaction %s: %w", tx.Hash(), err) log.Trace("Failed to rlp encode the pending transaction %s: %w", tx.Hash(), err)
@ -321,6 +317,10 @@ loop:
} }
} }
// Everything ok, collect the logs and shift in the next transaction from the same account
env.tcount++
txs.Shift()
default: default:
// Transaction is regarded as invalid, drop all consecutive transactions from // Transaction is regarded as invalid, drop all consecutive transactions from
// the same sender because of `nonce-too-high` clause. // the same sender because of `nonce-too-high` clause.