From c71b480b8f43fcf2fa1b14ab6864481e3cc9b95a Mon Sep 17 00:00:00 2001 From: Alexandru Matei Date: Thu, 10 Oct 2024 00:24:16 +0300 Subject: [PATCH] fix: set from block when updating sdk clients --- packages/indexer/src/services/HubPoolIndexerDataHandler.ts | 3 ++- packages/indexer/src/services/SpokePoolIndexerDataHandler.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/indexer/src/services/HubPoolIndexerDataHandler.ts b/packages/indexer/src/services/HubPoolIndexerDataHandler.ts index fd358ce4..4c5e930b 100644 --- a/packages/indexer/src/services/HubPoolIndexerDataHandler.ts +++ b/packages/indexer/src/services/HubPoolIndexerDataHandler.ts @@ -96,9 +96,10 @@ export class HubPoolIndexerDataHandler implements IndexerDataHandler { ): Promise { const { hubPoolClient, configStoreClient } = this; + hubPoolClient.firstBlockToSearch = blockRange.from; configStoreClient.eventSearchConfig.toBlock = blockRange.to; - hubPoolClient.eventSearchConfig.fromBlock = blockRange.from; hubPoolClient.eventSearchConfig.toBlock = blockRange.to; + await configStoreClient.update(); await hubPoolClient.update(); const proposedRootBundleEvents = diff --git a/packages/indexer/src/services/SpokePoolIndexerDataHandler.ts b/packages/indexer/src/services/SpokePoolIndexerDataHandler.ts index 66c6ddeb..f4ed0137 100644 --- a/packages/indexer/src/services/SpokePoolIndexerDataHandler.ts +++ b/packages/indexer/src/services/SpokePoolIndexerDataHandler.ts @@ -104,6 +104,7 @@ export class SpokePoolIndexerDataHandler implements IndexerDataHandler { ): Promise { const { configStoreClient, hubPoolClient, spokePoolClient } = this; + spokePoolClient.firstBlockToSearch = blockRange.from; spokePoolClient.eventSearchConfig.toBlock = blockRange.to; await configStoreClient.update();