Skip to content

Commit

Permalink
evil: fixes gas limit in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed Nov 7, 2023
1 parent e2c4f27 commit 7daee93
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions apps/src/lib/node/ledger/shell/finalize_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ mod test_finalize_block {
FinalizeBlock, ProcessedTx,
};

const GAS_LIMIT_MULTIPLIER: u64 = 1_000_000;
const GAS_LIMIT_MULTIPLIER: u64 = 100_000_000;

/// Make a wrapper tx and a processed tx from the wrapped tx that can be
/// added to `FinalizeBlock` request.
Expand Down Expand Up @@ -2414,18 +2414,10 @@ mod test_finalize_block {
assert_eq!(root_pre.0, root_post.0);

assert_eq!(event[0].event_type.to_string(), String::from("applied"));
let code = event[0]
.attributes
.get("code")
.expect("Testfailed")
.as_str();
let code = event[0].attributes.get("code").unwrap().as_str();
assert_eq!(code, String::from(ErrorCodes::Ok).as_str());
assert_eq!(event[1].event_type.to_string(), String::from("applied"));
let code = event[1]
.attributes
.get("code")
.expect("Testfailed")
.as_str();
let code = event[1].attributes.get("code").unwrap().as_str();
assert_eq!(code, String::from(ErrorCodes::WasmRuntimeError).as_str());

for (inner, wrapper) in [(inner, wrapper), (new_inner, new_wrapper)] {
Expand Down

0 comments on commit 7daee93

Please sign in to comment.