From ec0a05cf4f085c14190f5fc75cd9a23b992b01e2 Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Mon, 23 Sep 2024 20:02:09 -0400 Subject: [PATCH] backpressure log --- packages/core/src/sync/index.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/core/src/sync/index.ts b/packages/core/src/sync/index.ts index 29da82578..d58133254 100644 --- a/packages/core/src/sync/index.ts +++ b/packages/core/src/sync/index.ts @@ -682,6 +682,16 @@ export const createSync = async (args: CreateSyncParameters): Promise => { hexToNumber(ued.block.number) > hexToNumber(event.block.number), ); + if ( + getChainCheckpoint({ syncProgress, network, tag: "finalized" })! > + getOmnichainCheckpoint("current")! + ) { + args.common.logger.warn({ + service: "sync", + msg: `Finalized block for '${network.name}' has surpassed overall indexing checkpoint`, + }); + } + // Add finalized blocks, logs, transactions, receipts, and traces and intervals to the sync-store. await Promise.all([