Skip to content

Commit

Permalink
improve hash formatting in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
zeegomo committed Sep 24, 2021
1 parent 9d4c693 commit f156203
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jormungandr/src/network/mod.rs
Expand Up @@ -384,7 +384,7 @@ async fn handle_propagation_msg(
let prop_state = state.clone();
let unreached_nodes = match &msg {
PropagateMsg::Block(header) => {
Span::current().record("hash", &header.hash().to_string().as_str());
Span::current().record("hash", &format_args!("{}", header.description()));
tracing::debug!("received new block to propagate");
let header = header.encode();
propagate_message(
Expand All @@ -398,7 +398,7 @@ async fn handle_propagation_msg(
.await?
}
PropagateMsg::Fragment(fragment) => {
Span::current().record("hash", &fragment.hash().to_string().as_str());
Span::current().record("hash", &format_args!("{:.8}", fragment.hash()));
tracing::debug!(hash = %fragment.hash(), "fragment to propagate");
let fragment = fragment.encode();
propagate_message(
Expand Down

0 comments on commit f156203

Please sign in to comment.