Skip to content
Merged
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
19 changes: 13 additions & 6 deletions crates/evm/evm/src/executors/fuzz/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,19 @@ impl FuzzedExecutor {
// Discard run and apply max rejects if configured. Saturate to handle
// the case of replayed failure, which doesn't count as a run.
test_data.runs = test_data.runs.saturating_sub(1);
if self.config.max_test_rejects > 0 {
test_data.rejects += 1;
if test_data.rejects >= self.config.max_test_rejects {
test_data.failure = Some(err);
break 'stop;
}
test_data.rejects += 1;

// Update progress bar to reflect rejected runs.
if let Some(progress) = progress {
progress.set_message(format!("([{}] rejected)", test_data.rejects));
progress.dec(1);
}

if self.config.max_test_rejects > 0
&& test_data.rejects >= self.config.max_test_rejects
{
test_data.failure = Some(err);
break 'stop;
}
}
}
Expand Down
Loading