Update block metrics after async transaction verification

This commit is contained in:
teor 2020-10-26 22:32:57 +10:00 committed by Deirdre Connolly
parent fb079c2ca1
commit f5a53d9dae
1 changed files with 4 additions and 4 deletions

View File

@ -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