Skip to content

Commit

Permalink
skip logging presync range after finished to avoid confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
ecioppettini committed Mar 4, 2024
1 parent aa0b172 commit f02927d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/engine/paima-runtime/src/runtime-loops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]}`
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit f02927d

Please sign in to comment.