mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-09 21:47:34 +01:00
b922f6b526rpc: scanblocks, add "completed" flag to the result obj (furszy)ce50acc54frpc: scanblocks, do not traverse the whole chain block by block (furszy) Pull request description: Coming from https://github.com/bitcoin/bitcoin/pull/23549#pullrequestreview-1105712566 The current `scanblocks` flow walks-through every block in the active chain until hits the chain tip or processes 10k blocks, then calls `lookupFilterRange` function to obtain all filters from that particular range. This is only done to obtain the heights range to look up the block filters. Which is unneeded. 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. ACKs for top commit: achow101: ACKb922f6b526TheCharlatan: ACKb922f6b526Tree-SHA512: 0587e6d9cf87a59184adb2dbc26a4e2bce3a16233594c6c330f69feb49bf7dc63fdacf44fc20308e93441159ebc604c63eb7de19204d3e745a2ff16004892b45
6.3 KiB
Executable File
6.3 KiB
Executable File