mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-08 00:44:06 +00:00
Implement fetch and save of filtered event logs and required blocks (#445)
* Fix async block size caching for missing blocks in historical processing * Start historical block processing only if filter logs is set to true * Fetch filtered logs by topics and save required blocks * Fix realtime processing start block after historical processing * Avoid publishing events and blocks in historical processing * Add new method to graph-node test indexer * Get full block data for subgraph block handler only if configured * Add useBlockRanges flag for switching between historical and realtime processing
This commit is contained in:
@@ -93,12 +93,6 @@ 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);
|
||||
|
||||
@@ -118,6 +112,13 @@ export class Indexer implements IndexerInterface {
|
||||
return [];
|
||||
}
|
||||
|
||||
async fetchAndSaveFilteredEventsAndBlocks (startBlock: number, endBlock: number): Promise<{ blockProgress: BlockProgressInterface, events: DeepPartial<EventInterface>[] }[]> {
|
||||
assert(startBlock);
|
||||
assert(endBlock);
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
async saveBlockAndFetchEvents (block: BlockProgressInterface): Promise<[BlockProgressInterface, DeepPartial<EventInterface>[]]> {
|
||||
return [block, []];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user