chore: properly convert invalid transaction errors (#2748)

This commit is contained in:
Matthias Seitz
2023-05-19 19:35:05 +02:00
committed by GitHub
parent c25ff8c369
commit 2837fb6b9a
7 changed files with 141 additions and 65 deletions

View File

@ -9,6 +9,8 @@ pub enum InvalidTransactionError {
#[error("Sender does not have enough funds ({available_funds:?}) to cover transaction fees: {cost:?}.")]
InsufficientFunds { cost: U256, available_funds: U256 },
/// The nonce is lower than the account's nonce, or there is a nonce gap present.
///
/// This is a consensus error.
#[error("Transaction nonce is not consistent.")]
NonceNotConsistent,
/// The transaction is before Spurious Dragon and has a chain ID