Skip to content

Commit

Permalink
[fix] hyperledger-iroha#4097: Fix warp noise in logs
Browse files Browse the repository at this point in the history
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
  • Loading branch information
Erigara committed Nov 29, 2023
1 parent 794fe35 commit 7a6fe6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 1 addition & 3 deletions cli/src/torii/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 7 additions & 3 deletions core/src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 });
}

Expand All @@ -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,
Expand Down

0 comments on commit 7a6fe6b

Please sign in to comment.