From f5a53d9dae9760e7eda5e40049c0e9a1d6760ae4 Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 26 Oct 2020 22:32:57 +1000 Subject: [PATCH] Update block metrics after async transaction verification --- zebra-consensus/src/block.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zebra-consensus/src/block.rs b/zebra-consensus/src/block.rs index aed15fdd..c64be679 100644 --- a/zebra-consensus/src/block.rs +++ b/zebra-consensus/src/block.rs @@ -162,10 +162,6 @@ where // TODO: context-free header verification: merkle root - tracing::trace!("verified block"); - metrics::gauge!("block.verified.block.height", height.0 as _); - metrics::counter!("block.verified.block.count", 1); - let mut async_checks = FuturesUnordered::new(); for transaction in &block.transactions { @@ -182,6 +178,10 @@ where while let Some(result) = async_checks.next().await { result.map_err(VerifyBlockError::Transaction)?; } + + tracing::trace!("verified block"); + metrics::gauge!("block.verified.block.height", height.0 as _); + metrics::counter!("block.verified.block.count", 1); // Finally, submit the block for contextual verification. match state_service