Skip to content

Commit e74d632

Browse files
authored
fix: ci (#7363)
* fix: ci * fmt
1 parent 15c8d11 commit e74d632

File tree

1 file changed

+8
-5
lines changed
  • crates/forge/bin/cmd/test

1 file changed

+8
-5
lines changed

crates/forge/bin/cmd/test/mod.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,12 @@ impl TestArgs {
299299
// Set up trace identifiers.
300300
let known_contracts = runner.known_contracts.clone();
301301
let remote_chain_id = runner.evm_opts.get_remote_chain_id();
302-
let mut identifier = TraceIdentifiers::new()
303-
.with_local(&known_contracts)
304-
.with_etherscan(&config, remote_chain_id)?;
302+
let mut identifier = TraceIdentifiers::new().with_local(&known_contracts);
303+
304+
// Avoid using etherscan for gas report as we decode more traces and this will be expensive.
305+
if !self.gas_report {
306+
identifier = identifier.with_etherscan(&config, remote_chain_id)?;
307+
}
305308

306309
// Run tests.
307310
let (tx, rx) = channel::<(String, SuiteResult)>();
@@ -424,12 +427,12 @@ impl TestArgs {
424427
// setUp and constructor.
425428
for (kind, arena) in &result.traces {
426429
if !matches!(kind, TraceKind::Execution) {
427-
decoder.identify(arena, &mut local_identifier);
430+
decoder.identify(arena, &mut identifier);
428431
}
429432
}
430433

431434
for arena in trace {
432-
decoder.identify(arena, &mut local_identifier);
435+
decoder.identify(arena, &mut identifier);
433436
gas_report.analyze([arena], &decoder).await;
434437
}
435438
}

0 commit comments

Comments
 (0)