Page MenuHomePhabricator

validation: Move PruneOneBlockFile to BlockManager
ClosedPublic

Authored by PiRK on Jul 20 2021, 16:23.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC046b04cb79e9: 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