Skip to content

Commit e98fb81

Browse files
authored
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! <img width="1426" alt="image" src="https://github.com/user-attachments/assets/737bbdf0-c155-4603-91d7-94b9aaae3f2d"> This PR should address the issue.
1 parent a6aaf36 commit e98fb81

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/services/chain.ts

+2
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ export class ChainContext {
335335
log.debug(`Watchdog timeout: ${watchdogTimeout} seconds`);
336336
let lastBlockReceived = lastProcessedBlock;
337337
provider.on("block", async (blockNumber: number) => {
338+
metrics.blockHeight.labels(chainId.toString()).set(blockNumber);
339+
338340
try {
339341
log = getLogger({
340342
name: loggerName,

0 commit comments

Comments
 (0)