Skip to content

Commit

Permalink
Remove explicit panic
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare committed Sep 22, 2023
1 parent 73c7cb4 commit 164175d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion evm/src/generation/outputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn account_trie_record_to_output<F: Field>(
.inputs
.contract_code
.get(&account.code_hash)
.unwrap_or_else(|| panic!("Code not found: {:?}", account.code_hash))
.ok_or_else(|| ProgramError::UnknownContractCode)?
.clone();

Ok(AccountOutput {
Expand Down
1 change: 1 addition & 0 deletions evm/src/witness/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub enum ProgramError {
InterpreterError,
IntegerTooLarge,
ProverInputError(ProverInputError),
UnknownContractCode,
}

#[allow(clippy::enum_variant_names)]
Expand Down

0 comments on commit 164175d

Please sign in to comment.