aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-08-25 19:38:23 -0400
committerCarl Dong <contact@carldong.me>2020-09-21 13:27:44 -0400
commit3f5b5f3f6db0e5716911b3fba1460ce327e8a845 (patch)
treef8364c75d5a999791fd33847914eecf6014ecbe1 /src/validation.h
parentf8d4975ab3fcd3553843cf0862251289c88c106b (diff)
downloadbitcoin-3f5b5f3f6db0e5716911b3fba1460ce327e8a845.tar.xz
validation: Move FindFilesToPrune{,Manual} to BlockManager
[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.
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/validation.h b/src/validation.h
index 40611fa61f..94bf16968a 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -356,7 +356,15 @@ struct CBlockIndexWorkComparator
* This data is used mostly in `CChainState` - information about, e.g.,
* candidate tips is not maintained here.
*/
-class BlockManager {
+class BlockManager
+{
+ friend CChainState;
+
+private:
+ // See definition for documentation
+ void FindFilesToPruneManual(std::set<int>& setFilesToPrune, int nManualPruneHeight, int chain_tip_height);
+ void FindFilesToPrune(std::set<int>& setFilesToPrune, uint64_t nPruneAfterHeight, int chain_tip_height, bool is_ibd);
+
public:
BlockMap m_block_index GUARDED_BY(cs_main);