aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-08-25 19:05:50 -0400
committerCarl Dong <contact@carldong.me>2020-09-15 14:13:44 -0400
commitf8d4975ab3fcd3553843cf0862251289c88c106b (patch)
treefc52dc628f532971eb04873acd483aa5f19f831d /src/validation.h
parent74f73c783d46b012f375d819e2cd09c792820cd5 (diff)
downloadbitcoin-f8d4975ab3fcd3553843cf0862251289c88c106b.tar.xz
validation: Move PruneOneBlockFile to BlockManager
[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.
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/validation.h b/src/validation.h
index 2d9d2cb918..40611fa61f 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -407,6 +407,9 @@ public:
/** Create a new block index entry for a given block hash */
CBlockIndex* InsertBlockIndex(const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+ //! Mark one block file as pruned (modify associated database entries)
+ void PruneOneBlockFile(const int fileNumber) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+
/**
* If a block header hasn't already been seen, call CheckBlockHeader on it, ensure
* that it doesn't descend from an invalid block, and then add it to m_block_index.
@@ -903,9 +906,6 @@ public:
*/
bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& block, BlockValidationState& state, const CChainParams& chainparams, const CBlockIndex** ppindex = nullptr) LOCKS_EXCLUDED(cs_main);
- //! Mark one block file as pruned (modify associated database entries)
- void PruneOneBlockFile(const int fileNumber) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
-
//! Load the block tree and coins database from disk, initializing state if we're running with -reindex
bool LoadBlockIndex(const CChainParams& chainparams) EXCLUSIVE_LOCKS_REQUIRED(cs_main);