From 7a6fe6b60afccbc8850cb5b88cd2470800fe5b16 Mon Sep 17 00:00:00 2001 From: Shanin Roman Date: Wed, 29 Nov 2023 10:10:53 +0300 Subject: [PATCH] [fix] #4097: Fix warp noise in logs Signed-off-by: Shanin Roman --- cli/src/torii/routing.rs | 4 +--- core/src/queue.rs | 10 +++++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/cli/src/torii/routing.rs b/cli/src/torii/routing.rs index 48330bdffb9..8326453d7af 100644 --- a/cli/src/torii/routing.rs +++ b/cli/src/torii/routing.rs @@ -528,9 +528,7 @@ impl Torii { }) }); - let ws_router = events_ws_router - .or(blocks_ws_router) - .with(warp::trace::request()); + let ws_router = events_ws_router.or(blocks_ws_router); warp::any() .and( diff --git a/core/src/queue.rs b/core/src/queue.rs index b9b36f793e7..9a3365750d5 100644 --- a/core/src/queue.rs +++ b/core/src/queue.rs @@ -8,7 +8,7 @@ use eyre::{Report, Result}; use iroha_config::queue::Configuration; use iroha_crypto::HashOf; use iroha_data_model::{account::AccountId, transaction::prelude::*}; -use iroha_logger::{debug, info, trace, warn}; +use iroha_logger::{debug, trace, warn}; use iroha_primitives::must_use::MustUse; use rand::seq::IteratorRandom; use thiserror::Error; @@ -189,7 +189,6 @@ impl Queue { pub fn push(&self, tx: AcceptedTransaction, wsv: &WorldStateView) -> Result<(), Failure> { trace!(?tx, "Pushing to the queue"); if let Err(err) = self.check_tx(&tx, wsv) { - warn!("Failed to evaluate signature check. Error = {}", err); return Err(Failure { tx, err }); } @@ -199,8 +198,13 @@ impl Queue { let entry = match self.txs.entry(hash) { Entry::Occupied(mut old_tx) => { // MST case + let signatures_amount_before = old_tx.get().signatures().len(); assert!(old_tx.get_mut().merge_signatures(tx)); - info!("Signature added to existing multisignature transaction"); + let signatures_amount_after = old_tx.get().signatures().len(); + let new_signatures_amount = signatures_amount_after - signatures_amount_before; + if new_signatures_amount > 0 { + debug!(%hash, new_signatures_amount, "Signatures added to existing multisignature transaction"); + } return Ok(()); } Entry::Vacant(entry) => entry,