From f02927d04fd916c25a38dfa7186c0f6b4468a35d Mon Sep 17 00:00:00 2001 From: Enzo Cioppettini Date: Fri, 1 Mar 2024 03:04:28 -0300 Subject: [PATCH] skip logging presync range after finished to avoid confusion --- packages/engine/paima-runtime/src/runtime-loops.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/engine/paima-runtime/src/runtime-loops.ts b/packages/engine/paima-runtime/src/runtime-loops.ts index 14c509033..7f32eded1 100644 --- a/packages/engine/paima-runtime/src/runtime-loops.ts +++ b/packages/engine/paima-runtime/src/runtime-loops.ts @@ -76,6 +76,10 @@ async function runPresync( ); for (const network of Object.keys(networks)) { + if (presyncBlockHeight[network] === Number.MAX_SAFE_INTEGER) { + continue; + } + if (upper[network] > presyncBlockHeight[network]) { doLog( `[paima-runtime] Fetching data from ${network} in range: ${presyncBlockHeight[network]}-${upper[network]}` @@ -187,6 +191,11 @@ async function runPresyncRound( return Object.fromEntries( from.map(from => { if (latestPresyncDataList[from.network] === FUNNEL_PRESYNC_FINISHED) { + // we need to keep calling the presync function, but the carp funnel + // is not using the parameter anymore,since it handles pagination per + // cde, instead of a global pace. This is set as placeholder, since + // the block funnel will just keep returning that the presync is + // finished. return [from.network, Number.MAX_SAFE_INTEGER]; } else { return [from.network, from.to + 1];