Skip to content

Commit

Permalink
Renamed panic_on_fail func to get_error_message
Browse files Browse the repository at this point in the history
  • Loading branch information
mrLSD committed Aug 14, 2024
1 parent 6e46475 commit 5f5c6ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion engine-tests/src/tests/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ fn test_block_hash_contract() {
})
.unwrap();

let res = utils::panic_on_fail(result.status);
let res = utils::get_error_message(result.status);
assert!(res.is_none(), "Status: {res:?}");
}

Expand Down
2 changes: 1 addition & 1 deletion engine-tests/src/tests/standard_precompiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn test_standard_precompiles() {
.submit_with_signer(&mut signer, |nonce| contract.call_method("test_all", nonce))
.unwrap();

let res = utils::panic_on_fail(outcome.status);
let res = utils::get_error_message(outcome.status);
assert!(res.is_none(), "Status: {res:?}");
}

Expand Down
2 changes: 1 addition & 1 deletion engine-tests/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ pub fn unwrap_revert_slice(result: &SubmitResult) -> &[u8] {
}
}

pub fn panic_on_fail(status: TransactionStatus) -> Option<String> {
pub fn get_error_message(status: TransactionStatus) -> Option<String> {
match status {
TransactionStatus::Succeed(_) => None,
TransactionStatus::Revert(message) => {
Expand Down

0 comments on commit 5f5c6ec

Please sign in to comment.