This change allows pruned nodes to fetch older blocks from peers when pruning with a height that is lower than the current pruned height.
This makes use of #20295. The peer used to fetch blocks is by default the peerid 0.
I have added a functional test.
DrahtBot added the label RPC/REST/ZMQ on Apr 29, 2022
DrahtBot added the label Needs rebase on Apr 29, 2022
aureleoules marked this as a draft on Apr 29, 2022
aureleoules force-pushed on Apr 29, 2022
DrahtBot removed the label Needs rebase on Apr 29, 2022
aureleoules force-pushed on Apr 29, 2022
aureleoules marked this as ready for review on Apr 29, 2022
DrahtBot
commented at 6:07 AM on May 2, 2022:
contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
luke-jr
commented at 10:13 PM on May 7, 2022:
member
Concept and Approach NACK. Feels too much like a hack to do it this way IMO. At the very least, I think it should require an explicit opt-in to the new behaviour, but I'm not sure there's a good use case either. It would make more sense to fetch old blocks as needed (eg, transparently in getblock)
rpc: Make pruneblockchain fetch old blocks if height is lower than pruned heightc00d8c3f5b
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me