HomePhabricator

validation: Move PruneOneBlockFile to BlockManager

Description

validation: Move PruneOneBlockFile to BlockManager

Summary:
[META] This is a pure refactor commit.

Move PruneBlockFile to BlockManager because:

  1. PruneOneBlockFile only acts on BlockManager
  2. Eliminates the need for callers (FindFilesToPrune{,Manual}) to have a reference to the larger ChainstateManager, just a reference to BlockManager is enough. See following commits.

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

Depends on D9821

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
Carl Dong <contact@carldong.me>Authored on Aug 25 2020, 23:05
PiRKCommitted on Wed, Jul 21, 07:03
PiRKPushed on Wed, Jul 21, 07:03
Reviewer
Restricted Project
Differential Revision
D9822: validation: Move PruneOneBlockFile to BlockManager
Parents
rABC0082bd045768: validation: Pass in chainman to UnloadBlockIndex
Branches
Unknown
Tags
Unknown