PR description:
Maintaining the blockfilterindexes in prune mode is possible and may lead to efficient p2p based rescans of wallets (restore backups, import/sweep keys) beyond the prune height (rescans not part of that PR).
This PR allows running the blockfilterindex(es) in conjunction with pruning.
- Bitcoind/Qt will shutdown during startup when missing block data has been detected ([re]enable -blockfilterindex when we already have pruned)
- manual block pruning is disabled during blockfilterindex sync
- auto-pruning is delayed during blockfilterindex sync
Allow blockfilter in conjunction with prune
index: Fix backwards search for bestblock
Avoid accessing nullpointer in BaseIndex::GetSummary()
Avoid pruning below the blockfilterindex sync height
Add debug startup parameter -fastprune for more effective pruning tests
Add functional test for blockfilterindex in prune-mode
Fix several bugs in feature_blockfilterindex_prune.py
test: Intermittent issue in feature_blockfilterindex_prune
test: improve assertions in feature_blockfilterindex_prune.py
test: remove unneeded node from feature_blockfilterindex_prune.py
test: Add edge case of pruning up to index height
This is a backport of core#15946, core#21230, core#21252, core#21297 and core#23365
Backport notes:
- the test was buggy and ugly code after the first commit, so I had to squash all these commits to reach an acceptable quality.
- I had to use different numbers of blocks that are generated and pruned, because Bitcoin ABC can fit more blocks into each blk?????.dat file than core because in this test the witness data of the coinbase transaction makes core blocks larger. Comments were added to explain this where needed.
- I used the shortcut node = self.nodes[0] to make the code a bit more readable (shorter lines)