-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc: faster scanblocks by not traversing the whole chain block by block
The current flow walks-through every block in the active chain until hits the chain tip or processes 10k blocks, then calls the `lookupFilterRange` function to obtain all the filters from that particular range. That isn't the best as it traverses the whole chain only to obtain the heights range to lookup the block filters. As `scanblocks` only lookup block filters in the active chain, we can directly calculate the lookup range heights, by using the chain tip, without requiring to traverse the chain block by block.
- Loading branch information
Showing
1 changed file
with
43 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters