@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.
- package/dist/src/index.d.ts +31 -18
- package/dist/src/index.js +4 -4
- package/dist/src/index.js.map +3 -3
- package/dist/src/runtime/processor.js +5 -6
- package/dist/src/runtime/processor.js.map +4 -4
- package/dist/src/runtime/reindex.d.ts +59 -3
- package/dist/src/runtime/reindex.js +5 -4
- package/dist/src/runtime/reindex.js.map +3 -3
- package/dist/src/service.js +5 -6
- package/dist/src/service.js.map +4 -4
- package/package.json +1 -1
|
@@ -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
|
|
3357
|
-
const
|
|
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
|
-
|
|
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=
|
|
4418
|
+
//# debugId=6207636F26ECACDC64756E2164756E21
|
|
4420
4419
|
//# sourceMappingURL=processor.js.map
|