Add new job queue for historical blocks processing (#442)

* Add TODOs for historical blocks processing

* Add new job for historical blocks processing

* Handle historical job completion

* Fetch latest block in chain and start historical block processing

* Fix starting realtime block processing from latest canonical block

* Refactor historical block processing method and add logs

* Add dummy indexer methods in graph-node to pass test

* Changes in codegen for historical processing in generated watcher
This commit is contained in:
2023-11-01 10:38:59 +05:30
committed by GitHub
parent 15ee523e71
commit 6c17662cad
14 changed files with 306 additions and 51 deletions
+13
View File
@@ -93,6 +93,12 @@ export class Indexer implements IndexerInterface {
return [];
}
async getLatestProcessedBlockProgress (isPruned: boolean): Promise<BlockProgressInterface | undefined> {
assert(isPruned);
return undefined;
}
async getBlockEvents (blockHash: string): Promise<Array<EventInterface>> {
assert(blockHash);
@@ -150,6 +156,13 @@ export class Indexer implements IndexerInterface {
return {} as SyncStatusInterface;
}
async forceUpdateSyncStatus (blockHash: string, blockNumber: number): Promise<SyncStatusInterface> {
assert(blockNumber);
assert(blockHash);
return {} as SyncStatusInterface;
}
async markBlocksAsPruned (blocks: BlockProgressInterface[]): Promise<void> {
assert(blocks);