HomePhabricator

Bugfix: RPC/blockchain: pruneblockchain: Return the height of the actual last…

Description

Bugfix: RPC/blockchain: pruneblockchain: Return the height of the actual last pruned block

Summary:
From 0.14 (2017 Mar) until before 0.19 (2019 Nov), the height of the last
block pruned was returned, subject to a bug if there were blocks left unpruned
due to sharing files with later blocks.

In #15991, this was "fixed" to the current implementation, introducing a new
bug: now, it returns the first *unpruned* block.

Since the user provides the parameter as a block to include in pruning, it
makes more sense to fix the behaviour to match the documentation.

This is a backport of core#24629

Depends on D17743

Test Plan: ninja all check check-functional-extended

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D17742

Details

Provenance
Luke Dashjr <luke-jr+git@utopios.org>Authored on Mar 21 2022, 18:38
PiRKCommitted on Tue, Mar 4, 10:00
PiRKPushed on Tue, Mar 4, 10:00
Reviewer
Restricted Project
Differential Revision
D17742: Bugfix: RPC/blockchain: pruneblockchain: Return the height of the actual last pruned block
Parents
rABCd4bbff907ce8: Bump version to 0.30.13
Branches
Unknown
Tags
Unknown