Skip to content

Commit

Permalink
fix(invariant): πŸ› check for assert failures on handlers (foundry-rs#4980
Browse files Browse the repository at this point in the history
)
  • Loading branch information
bronzelle authored May 19, 2023
1 parent 584cc99 commit c331b5e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion evm/src/fuzz/invariant/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,12 @@ fn can_continue(
shrink_sequence: bool,
) -> (bool, Option<BTreeMap<String, RawCallResult>>) {
let mut call_results = None;
if !call_result.reverted {
if executor.is_success(
invariant_contract.address,
call_result.reverted,
call_result.state_changeset.clone().unwrap_or_default(),
fail_on_revert,
) {
call_results = assert_invariants(invariant_contract, executor, calldata, failures).ok();
if call_results.is_none() {
return (false, None)
Expand Down

0 comments on commit c331b5e

Please sign in to comment.