diff --git a/zebra-network/src/protocol/codec.rs b/zebra-network/src/protocol/codec.rs index 5feb693ab..87e57824c 100644 --- a/zebra-network/src/protocol/codec.rs +++ b/zebra-network/src/protocol/codec.rs @@ -308,8 +308,12 @@ impl Decoder for Codec { b"merkleblock\0" => self.read_merkleblock(body_reader), _ => bail!("unknown command"), } - // We need Ok(Some(msg)) to signal that we're done decoding - .map(|msg| Some(msg)) + // We need Ok(Some(msg)) to signal that we're done decoding. + // This is also convenient for tracing the parse result. + .map(|msg| { + trace!(?msg); + Some(msg) + }) } } }