HomePhabricator

validation: Move FindFilesToPrune{,Manual} to BlockManager

Description

validation: Move FindFilesToPrune{,Manual} to BlockManager

Summary:
[META] No behaviour change is intended in this commit.
[META] This commit should be followed up by removing the comments and assertions meant only to show that the change is correct.

Also stop FindFilesToPrune{,Manual} from unnecessary reaching for
::ChainActive() by passing in the necessary information.

Backport note: forward declaration of class CChainState was necessary for declaring this class friend of BlockManager.

This is a backport of core#19927 [4/6]
https://github.com/bitcoin/bitcoin/pull/19927/commits/3f5b5f3f6db0e5716911b3fba1460ce327e8a845#

Depends on D9822

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
Carl Dong <contact@carldong.me>Authored on Aug 25 2020, 23:38
PiRKCommitted on Jul 21 2021, 07:15
PiRKPushed on Jul 21 2021, 07:15
Reviewer
Restricted Project
Differential Revision
D9823: validation: Move FindFilesToPrune{,Manual} to BlockManager
Parents
rABC046b04cb79e9: validation: Move PruneOneBlockFile to BlockManager
Branches
Unknown
Tags
Unknown