From bffd1b1394986507e95b4c3b57c84176c0a4a806 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Sun, 31 Jul 2022 12:57:21 -0400 Subject: [PATCH] fix initial height for scribe metrics --- hub/scribe/service.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hub/scribe/service.py b/hub/scribe/service.py index 5585757..9c7cbe3 100644 --- a/hub/scribe/service.py +++ b/hub/scribe/service.py @@ -1745,6 +1745,7 @@ class BlockchainProcessorService(BlockchainService): await self.run_in_thread_with_lock(flush) def _iter_start_tasks(self): + self.block_count_metric.set(0 if not self.last_state else self.last_state.height) yield self.start_prometheus() while self.db.db_version < max(self.db.DB_VERSIONS): if self.db.db_version == 7: