feature: Add a verified blocks metrics counter
We have a counter for pending "download and verify" futures. But these
futures are spawned, so they can complete in any order. They can also
complete before we receive their results.
@@ -422,7 +422,9 @@ where
};
metrics::counter!("sync.downloaded_blocks", 1);
- verifier.ready_and().await?.call(block).await
+ let result = verifier.ready_and().await?.call(block).await;
+ metrics::counter!("sync.verified_blocks", 1);
+ result
})
.instrument(span);
self.pending_blocks.push(task);
