Page MenuHomePhabricator

[backport#15991] Bugfix: fix pruneblockchain returned prune height
ClosedPublic

Authored by majcosta on Sep 7 2020, 22:58.

Details

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 PR15991

Test Plan
ninja check check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

majcosta requested review of this revision.Sep 7 2020, 22:58

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.Sep 8 2020, 03:45