Skip to content

Commit

Permalink
fixed crashing app on bad wasm code
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry123 committed Dec 8, 2023
1 parent e82536c commit aeeb65c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions crates/rpc/rpc/src/eth/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ pub enum RpcInvalidTransactionError {
#[error(transparent)]
#[cfg(feature = "optimism")]
Optimism(#[from] OptimismInvalidTransactionError),
/// rWASM compilation failed
#[error("rWASM compilation failed")]
RwasmCompilationFailed,
}

/// Optimism specific invalid transaction errors
Expand Down Expand Up @@ -469,6 +472,7 @@ impl From<revm::primitives::InvalidTransaction> for RpcInvalidTransactionError {
InvalidTransaction::HaltedDepositPostRegolith => RpcInvalidTransactionError::Optimism(
OptimismInvalidTransactionError::HaltedDepositPostRegolith,
),
InvalidTransaction::RwasmCompilationFailed => RpcInvalidTransactionError::RwasmCompilationFailed,
}
}
}
Expand Down

0 comments on commit aeeb65c

Please sign in to comment.