@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
@@ -4416,5 +4415,5 @@ export {
4416
4415
  startSubgraphOperationRunner
4417
4416
  };
4418
4417
 
4419
- //# debugId=5F4B19852B2CA5CB64756E2164756E21
4418
+ //# debugId=6207636F26ECACDC64756E2164756E21
4420
4419
  //# sourceMappingURL=processor.js.map