@secondlayer/subgraphs 3.25.1 → 3.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3353,9 +3353,9 @@ async function processBlockRange(def, opts) {
3353
3353
  return { blocksProcessed, totalEventsProcessed, totalErrors, aborted };
3354
3354
  }
3355
3355
  async function resolveBlockRange(source, def, opts) {
3356
- const fromBlock = opts?.fromBlock ?? def.startBlock ?? 1;
3357
- const toBlock = opts?.toBlock != null ? opts.toBlock : await source.getTip();
3358
- return { fromBlock, toBlock };
3356
+ const definitionStart = def.startBlock ?? 1;
3357
+ const fromBlock = opts?.startBlockFloor != null ? Math.max(definitionStart, opts.startBlockFloor) : definitionStart;
3358
+ return { fromBlock, toBlock: await source.getTip() };
3359
3359
  }
3360
3360
  async function clearReindexMetadata(db, subgraphName) {
3361
3361
  await db.updateTable("subgraphs").set({ reindex_from_block: null, reindex_to_block: null }).where("name", "=", subgraphName).execute();
@@ -4203,8 +4203,7 @@ async function runSubgraphOperation(operation, signal) {
4203
4203
  return result2.processed;
4204
4204
  }
4205
4205
  const result = await reindexSubgraph(def, {
4206
- fromBlock: operation.from_block == null ? undefined : Number(operation.from_block),
4207
- toBlock: operation.to_block == null ? undefined : Number(operation.to_block),
4206
+ startBlockFloor: operation.from_block == null ? undefined : Number(operation.from_block),
4208
4207
  schemaName,
4209
4208
  operationId: operation.id,
4210
4209
  signal
@@ -4442,5 +4441,5 @@ var shutdown = async () => {
4442
4441
  process.on("SIGINT", shutdown);
4443
4442
  process.on("SIGTERM", shutdown);
4444
4443
 
4445
- //# debugId=957751E5CE73209364756E2164756E21
4444
+ //# debugId=7245DBAA296CAD9A64756E2164756E21
4446
4445
  //# sourceMappingURL=service.js.map