-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Bugfix: fix pruneblockchain returned prune height #15991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix: fix pruneblockchain returned prune height #15991
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 2b3849d.
Please see 87af0b4 in https://github.com/promag/bitcoin/tree/pr15991, where the highest pruned block is returned from FindFilesToPruneManual.
Edit: on a second thought your code is more suitable for backport.
|
Tested ACK 2b3849d, but should fix the extended test With this change I think it makes sense to compare the result with |
|
Travis fails in pruning: https://travis-ci.org/bitcoin/bitcoin/builds/533034514 |
|
@jonasschnelli are you still working on this? |
|
I haven't started working on the prune test fix... I have plans to do this the next week. But happy to pull in a commit if someone else wants to fix it. |
|
@jonasschnelli promag/bitcoin@22ff1bbe7 is an option, if accepted should be squashed. |
2b3849d to
e0cbbaa
Compare
|
@jonasschnelli Are you sure you pushed the correct branch? |
|
@jonasschnelli My previous ACK was 2b3849d, which is a small bugfix. The current pull request adds a config option, which does not qualify as a bugfix that should be backported. |
The test will fail otherwise, breaking |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
e0cbbaa to
f402012
Compare
|
There was a rebase issue. Thanks, @MarcoFalke for reporting. Fixed. |
|
ACK f402012 |
f402012 fixup: Fix prunning test (João Barbosa) 97f517d Fix RPC/pruneblockchain returned prune height (Jonas Schnelli) Pull request description: The help of `pruneblockchain` tells us that the return value is `Height of the last block pruned.`,... but the implementation naively returns the provided input `height` and therefore not respecting that pruning can't be done on all possible blockheight due to the fact that we only prune complete blockfiles (which combine multiple blocks). This fixes the return value to actually return the correct prune height. ACKs for commit f40201: MarcoFalke: ACK f402012 Tree-SHA512: 88c910030ffb83196663e5ebebc29d036fcdbbb2ab266e4538991867924a61bacd8361c1fbf294a0ea7e02347ae183d792f10a10b8f6187e8a4c4c6e4124d7e6
f402012 fixup: Fix prunning test (João Barbosa) 97f517d Fix RPC/pruneblockchain returned prune height (Jonas Schnelli) Pull request description: The help of `pruneblockchain` tells us that the return value is `Height of the last block pruned.`,... but the implementation naively returns the provided input `height` and therefore not respecting that pruning can't be done on all possible blockheight due to the fact that we only prune complete blockfiles (which combine multiple blocks). This fixes the return value to actually return the correct prune height. ACKs for commit f40201: MarcoFalke: ACK f402012 Tree-SHA512: 88c910030ffb83196663e5ebebc29d036fcdbbb2ab266e4538991867924a61bacd8361c1fbf294a0ea7e02347ae183d792f10a10b8f6187e8a4c4c6e4124d7e6
Github-Pull: bitcoin#15991 Rebased-From: 97f517d
Github-Pull: bitcoin#15991 Rebased-From: f402012
Github-Pull: bitcoin#15991 Rebased-From: 97f517d
Github-Pull: bitcoin#15991 Rebased-From: f402012
Github-Pull: bitcoin#15991 Rebased-From: 97f517d
Github-Pull: bitcoin#15991 Rebased-From: f402012
Summary: fixup: Fix prunning test (João Barbosa) Fix RPC/pruneblockchain returned prune height (Jonas Schnelli) Pull request description: The help of `pruneblockchain` tells us that the return value is `Height of the last block pruned.`,... but the implementation naively returns the provided input `height` and therefore not respecting that pruning can't be done on all possible blockheight due to the fact that we only prune complete blockfiles (which combine multiple blocks). This fixes the return value to actually return the correct prune height. --- Backport of Core [[bitcoin/bitcoin#15991 | PR15991]] Test Plan: ninja check check-functional Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7389
f402012 fixup: Fix prunning test (João Barbosa) 97f517d Fix RPC/pruneblockchain returned prune height (Jonas Schnelli) Pull request description: The help of `pruneblockchain` tells us that the return value is `Height of the last block pruned.`,... but the implementation naively returns the provided input `height` and therefore not respecting that pruning can't be done on all possible blockheight due to the fact that we only prune complete blockfiles (which combine multiple blocks). This fixes the return value to actually return the correct prune height. ACKs for commit f40201: MarcoFalke: ACK f402012 Tree-SHA512: 88c910030ffb83196663e5ebebc29d036fcdbbb2ab266e4538991867924a61bacd8361c1fbf294a0ea7e02347ae183d792f10a10b8f6187e8a4c4c6e4124d7e6
f402012 fixup: Fix prunning test (João Barbosa) 97f517d Fix RPC/pruneblockchain returned prune height (Jonas Schnelli) Pull request description: The help of `pruneblockchain` tells us that the return value is `Height of the last block pruned.`,... but the implementation naively returns the provided input `height` and therefore not respecting that pruning can't be done on all possible blockheight due to the fact that we only prune complete blockfiles (which combine multiple blocks). This fixes the return value to actually return the correct prune height. ACKs for commit f40201: MarcoFalke: ACK f402012 Tree-SHA512: 88c910030ffb83196663e5ebebc29d036fcdbbb2ab266e4538991867924a61bacd8361c1fbf294a0ea7e02347ae183d792f10a10b8f6187e8a4c4c6e4124d7e6
The help of
pruneblockchaintells us that the return value isHeight of the last block pruned.,... but the implementation naively returns the provided inputheightand therefore not respecting that pruning can't be done on all possible blockheight due to the fact that we only prune complete blockfiles (which combine multiple blocks).This fixes the return value to actually return the correct prune height.