Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions crates/evm/evm/src/executors/invariant/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,17 +392,21 @@ impl<'a> InvariantExecutor<'a> {
.last()
.ok_or_else(|| eyre!("no input generated to call fuzzed target."))?;

self.executor.strategy.runner.checkpoint();
// Execute call from the randomly generated sequence without committing state.
// State is committed only if call is not a magic assume.
let mut call_result = current_run
let call_result = current_run
.executor
.call_raw(
tx.sender,
tx.call_details.target,
tx.call_details.calldata.clone(),
U256::ZERO,
)
.map_err(|e| eyre!(format!("Could not make raw evm call: {e}")))?;
.map_err(|e| eyre!(format!("Could not make raw evm call: {e}")));
self.executor.strategy.runner.reload_checkpoint();

let mut call_result = call_result?;

let discarded = call_result.result.as_ref() == MAGIC_ASSUME;
if self.config.show_metrics {
Expand Down
Loading