Skip to content

Commit 30fadef

Browse files
committed
fix(cheatcodes): empty step logs and ordering too
1 parent aa69ed1 commit 30fadef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/cheatcodes/src/evm.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -855,11 +855,12 @@ impl Cheatcode for stopAndReturnDebugTraceRecordingCall {
855855

856856
let debug_steps: Vec<DebugStep> =
857857
steps.iter().map(|&step| convert_call_trace_to_debug_step(step)).collect();
858-
859858
// Free up memory by clearing the steps if they are not recorded outside of cheatcode usage.
860859
if !record_info.original_tracer_config.record_steps {
861860
tracer.traces_mut().nodes_mut().iter_mut().for_each(|node| {
862-
node.trace.steps = Vec::new();
861+
node.trace.steps.clear();
862+
node.logs.clear();
863+
node.ordering.clear();
863864
});
864865
}
865866

0 commit comments

Comments
 (0)