From a720f76bd2bf609de10e703c2a985eadf40794b9 Mon Sep 17 00:00:00 2001 From: zeroXbrock <2791467+zeroXbrock@users.noreply.github.com> Date: Tue, 10 Dec 2024 18:07:48 -0800 Subject: [PATCH] fix erroneous log --- crates/core/src/spammer/tx_actor.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/crates/core/src/spammer/tx_actor.rs b/crates/core/src/spammer/tx_actor.rs index 37a0619..35d3b87 100644 --- a/crates/core/src/spammer/tx_actor.rs +++ b/crates/core/src/spammer/tx_actor.rs @@ -152,16 +152,17 @@ where .expect("this should never happen"); if !receipt.status() { println!("tx failed: {:?}", pending_tx.tx_hash); + } else { + println!( + "tx landed. hash={}\tgas_used={}\tblock_num={}", + pending_tx.tx_hash, + receipt.gas_used, + receipt + .block_number + .map(|n| n.to_string()) + .unwrap_or("N/A".to_owned()) + ); } - println!( - "tx landed. hash={}\tgas_used={}\tblock_num={}", - pending_tx.tx_hash, - receipt.gas_used, - receipt - .block_number - .map(|n| n.to_string()) - .unwrap_or("N/A".to_owned()) - ); RunTx { tx_hash: pending_tx.tx_hash, start_timestamp: pending_tx.start_timestamp,