Commit d11d4ad7 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #4791 from ethereum-optimism/sc/l2g-nonce-too-high

feat(l2g): properly return NonceTooHigh
parents 83823b0e 4729bc7b
---
'@eth-optimism/l2geth': patch
---
Has l2geth return a NonceToHigh response if the txn nonce is greater than the expected nonce.
......@@ -555,8 +555,10 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
}
// Ensure the transaction adheres to nonce ordering
if rcfg.UsingOVM {
if pool.currentState.GetNonce(from) != tx.Nonce() {
if pool.currentState.GetNonce(from) > tx.Nonce() {
return ErrNonceTooLow
} else if pool.currentState.GetNonce(from) < tx.Nonce() {
return ErrNonceTooHigh
}
} else {
if pool.currentState.GetNonce(from) > tx.Nonce() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment