diff --git a/crates/forge/bin/cmd/test/mod.rs b/crates/forge/bin/cmd/test/mod.rs index 1a8cf9eed418..af8abc3493d3 100644 --- a/crates/forge/bin/cmd/test/mod.rs +++ b/crates/forge/bin/cmd/test/mod.rs @@ -416,9 +416,6 @@ impl TestArgs { // Decode the traces let mut decoded_traces = Vec::with_capacity(result.traces.len()); for (kind, arena) in &mut result.traces { - decoder.identify(arena, &mut local_identifier); - decoder.identify(arena, &mut etherscan_identifier); - // verbosity: // - 0..3: nothing // - 3: only display traces for failed tests @@ -433,10 +430,14 @@ impl TestArgs { } TraceKind::Deployment => false, }; - - if should_include { - decoded_traces.push(render_trace_arena(arena, &decoder).await?); + if !should_include { + continue; } + + decoder.identify(arena, &mut local_identifier); + decoder.identify(arena, &mut etherscan_identifier); + + decoded_traces.push(render_trace_arena(arena, &decoder).await?); } if !decoded_traces.is_empty() {