From e98fb813eedb9c90e3aa5c7a8e080cd1312e5fac Mon Sep 17 00:00:00 2001 From: Anxo Rodriguez Date: Sat, 7 Dec 2024 14:57:31 +0000 Subject: [PATCH] fix: fix missing update on the latest block (#173) # Description Follow up on an error from #172 Basically, I forgot to update the latest block after the warm up (when we are subscribing to new blocks) I noticed, because the chart looks funny! image This PR should address the issue. --- src/services/chain.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/services/chain.ts b/src/services/chain.ts index 940f18e..6804772 100644 --- a/src/services/chain.ts +++ b/src/services/chain.ts @@ -335,6 +335,8 @@ export class ChainContext { log.debug(`Watchdog timeout: ${watchdogTimeout} seconds`); let lastBlockReceived = lastProcessedBlock; provider.on("block", async (blockNumber: number) => { + metrics.blockHeight.labels(chainId.toString()).set(blockNumber); + try { log = getLogger({ name: loggerName,