mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-08 00:44:06 +00:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user