Fetch txs only for blocks having relevant events (#436)

* Fix address filter usage in rpc-eth-client getLogs implementation

* Avoid fetching block txs when no relevant logs exist
This commit is contained in:
prathamesh0
2023-10-25 14:36:03 +05:30
committed by GitHub
parent 07887c160e
commit 320bf02938
3 changed files with 31 additions and 21 deletions
@@ -626,7 +626,7 @@ export class Indexer implements IndexerInterface {
}
async fetchEventsAndSaveBlocks (blocks: DeepPartial<BlockProgress>[]): Promise<{ blockProgress: BlockProgress, events: DeepPartial<Event>[] }[]> {
return this._baseIndexer.fetchEventsAndSaveBlocks(blocks, this.parseEventNameAndArgs.bind(this))
return this._baseIndexer.fetchEventsAndSaveBlocks(blocks, this.parseEventNameAndArgs.bind(this));
}
async saveBlockAndFetchEvents (block: DeepPartial<BlockProgress>): Promise<[BlockProgress, DeepPartial<Event>[]]> {