Skip to content

Commit

Permalink
only log messages when simulation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
BlaineHeffron committed Jul 29, 2024
1 parent f384e95 commit 54c4d05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/soroban-cli/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ pub async fn log_simulation_result(
) -> Result<Assembled, RPCError> {
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 {
Expand Down

0 comments on commit 54c4d05

Please sign in to comment.