mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: improve nonce too low error (#10711)
This commit is contained in:
committed by
GitHub
parent
834e99cd2a
commit
8bbd403285
@ -359,11 +359,14 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
let tx_nonce = transaction.nonce();
|
||||
|
||||
// Checks for nonce
|
||||
if transaction.nonce() < account.nonce {
|
||||
if tx_nonce < account.nonce {
|
||||
return TransactionValidationOutcome::Invalid(
|
||||
transaction,
|
||||
InvalidTransactionError::NonceNotConsistent.into(),
|
||||
InvalidTransactionError::NonceNotConsistent { tx: tx_nonce, state: account.nonce }
|
||||
.into(),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user