Skip to content

Commit

Permalink
fix(cheatcodes): empty ordering and step logs too
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy committed Dec 10, 2024
1 parent aa69ed1 commit 923b0e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/cheatcodes/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -855,11 +855,12 @@ impl Cheatcode for stopAndReturnDebugTraceRecordingCall {

let debug_steps: Vec<DebugStep> =
steps.iter().map(|&step| convert_call_trace_to_debug_step(step)).collect();

// Free up memory by clearing the steps if they are not recorded outside of cheatcode usage.
if !record_info.original_tracer_config.record_steps {
tracer.traces_mut().nodes_mut().iter_mut().for_each(|node| {
node.trace.steps = Vec::new();
node.logs = Vec::new();
node.ordering = Vec::new();
});
}

Expand Down

0 comments on commit 923b0e7

Please sign in to comment.