fix initial height for scribe metrics

This commit is contained in:
Jack Robison 2022-07-31 12:57:21 -04:00
parent 34e3f9ecee
commit bffd1b1394

View file

@ -1745,6 +1745,7 @@ class BlockchainProcessorService(BlockchainService):
await self.run_in_thread_with_lock(flush) await self.run_in_thread_with_lock(flush)
def _iter_start_tasks(self): 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() yield self.start_prometheus()
while self.db.db_version < max(self.db.DB_VERSIONS): while self.db.db_version < max(self.db.DB_VERSIONS):
if self.db.db_version == 7: if self.db.db_version == 7: