From 54c4d0522952ba28bb2d8dfd596a674b63401c6b Mon Sep 17 00:00:00 2001 From: Blaine Heffron Date: Mon, 29 Jul 2024 19:21:04 -0400 Subject: [PATCH] only log messages when simulation fails --- cmd/soroban-cli/src/utils.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/soroban-cli/src/utils.rs b/cmd/soroban-cli/src/utils.rs index 389996d31..df79c47f0 100644 --- a/cmd/soroban-cli/src/utils.rs +++ b/cmd/soroban-cli/src/utils.rs @@ -22,10 +22,10 @@ pub async fn log_simulation_result( ) -> Result { match client.simulate_and_assemble_transaction(tx).await { Ok(outcome) => { - if !&outcome.sim_res.events.is_empty() { - crate::log::sim_diagnostic_events(&outcome.sim_res.events, tracing::Level::INFO); - } outcome.assembled.ok_or_else(|| { + if !&outcome.sim_res.events.is_empty() { + crate::log::sim_diagnostic_events(&outcome.sim_res.events, tracing::Level::INFO); + } if let Some(error) = outcome.sim_res.error { RPCError::TransactionSimulationFailed(error) } else {