diff --git a/zebra-consensus/src/block.rs b/zebra-consensus/src/block.rs index c7c1ae10..704931a2 100644 --- a/zebra-consensus/src/block.rs +++ b/zebra-consensus/src/block.rs @@ -108,6 +108,10 @@ where async move { let hash = block.hash(); + // The height is already included in the ChainVerifier span + let span = tracing::debug_span!("BlockVerifier.call", ?hash); + let _entered = span.enter(); + // Check that this block is actually a new block. match state_service .ready_and() @@ -124,8 +128,9 @@ where _ => unreachable!("wrong response to Request::Depth"), } - // These checks only apply to generated blocks. We check the block - // height for parsed blocks when we deserialize them. + // We repeat the height checks here, to ensure that generated blocks + // are valid. (We check the block heights for parsed blocks when we + // deserialize them.) let height = block .coinbase_height() .ok_or(BlockError::MissingHeight(hash))?; diff --git a/zebra-consensus/src/chain.rs b/zebra-consensus/src/chain.rs index a529b7be..446848b0 100644 --- a/zebra-consensus/src/chain.rs +++ b/zebra-consensus/src/chain.rs @@ -77,7 +77,7 @@ where fn call(&mut self, block: Arc) -> Self::Future { let height = block.coinbase_height(); - let span = tracing::info_span!("chain_call", ?height); + let span = tracing::info_span!("ChainVerifier.call", ?height); let _entered = span.enter(); tracing::debug!("verifying new block");