Skip to content

Commit

Permalink
fix(cheatcodes): empty step logs and ordering too
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy committed Dec 10, 2024
1 parent aa69ed1 commit 30fadef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 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.trace.steps.clear();
node.logs.clear();
node.ordering.clear();
});
}

Expand Down

0 comments on commit 30fadef

Please sign in to comment.