From f2a2901d65db240708ac7ec55f5d6774123d0b54 Mon Sep 17 00:00:00 2001 From: Nabarun Date: Thu, 20 Jun 2024 10:03:22 +0530 Subject: [PATCH] Fix comments for historical block processing checks --- packages/util/src/events.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/util/src/events.ts b/packages/util/src/events.ts index 4d7b637e..b6b2e5dc 100644 --- a/packages/util/src/events.ts +++ b/packages/util/src/events.ts @@ -125,11 +125,11 @@ export class EventWatcher { // Perform checks before starting historical block processing if ( - // Check if any block handler exists in subgraph config + // Skip historical block processing if any block handler exists !this._indexer.graphWatcher?.blockHandlerExists && - // Check if useBlockRanges is enabled for historical blocks processing + // Run historical block processing if useBlockRanges is enabled this._config.jobQueue.useBlockRanges && - // Check if starting block for watcher is before latest canonical block + // Only run historical block processing if we are below the frothy region startBlockNumber < latestCanonicalBlockNumber ) { await this.startHistoricalBlockProcessing(startBlockNumber, latestCanonicalBlockNumber);