Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main: cfindex related sanity checks when enabled with pruning
This change is part of the effort to add pruning support to btcd. cfIndex is a useful index even if the node has been pruned so it's allowed to be enabled together with pruning. However, if the user had disabled cfindex and enabled pruning, it's not possible to generate them. In this case, we tell the user that it's impossible unless the user deletes and start anew. Additionally, if the user had enabled cfindex and also enabled pruning from the start, don't let the user turn the cfindex off without dropping it explicitly. This is to make sure that the user isn't left at an inconsistent state where the cfindex isn't able to catch up to the tip because the blocks have already been pruned.
- Loading branch information