Skip to content

Commit 916b3f0

Browse files
committed
merge bitcoin#24917: Make BlockManager::LoadBlockIndex private
1 parent e10ca27 commit 916b3f0

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/node/blockstorage.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ class BlockManager
9090
friend ChainstateManager;
9191

9292
private:
93+
/**
94+
* Load the blocktree off disk and into memory. Populate certain metadata
95+
* per index entry (nStatus, nChainWork, nTimeMax, etc.) as well as peripheral
96+
* collections like m_dirty_blockindex.
97+
*/
98+
bool LoadBlockIndex(const Consensus::Params& consensus_params)
99+
EXCLUSIVE_LOCKS_REQUIRED(cs_main);
93100
void FlushBlockFile(bool fFinalize = false, bool finalize_undo = false);
94101
void FlushUndoFile(int block_file, bool finalize = false);
95102
bool FindBlockPos(FlatFilePos& pos, unsigned int nAddSize, unsigned int nHeight, CChain& active_chain, uint64_t nTime, bool fKnown);
@@ -147,14 +154,6 @@ class BlockManager
147154
bool WriteBlockIndexDB() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
148155
bool LoadBlockIndexDB() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
149156

150-
/**
151-
* Load the blocktree off disk and into memory. Populate certain metadata
152-
* per index entry (nStatus, nChainWork, nTimeMax, etc.) as well as peripheral
153-
* collections like m_dirty_blockindex.
154-
*/
155-
bool LoadBlockIndex(const Consensus::Params& consensus_params)
156-
EXCLUSIVE_LOCKS_REQUIRED(cs_main);
157-
158157
/** Clear all data members. */
159158
void Unload() EXCLUSIVE_LOCKS_REQUIRED(cs_main);
160159

src/validation.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,6 @@ class ChainstateManager
845845
bool m_snapshot_validated{false};
846846

847847
CBlockIndex* m_best_invalid;
848-
friend bool BlockManager::LoadBlockIndex(const Consensus::Params&);
849848

850849
//! Internal helper for ActivateSnapshot().
851850
[[nodiscard]] bool PopulateAndValidateSnapshot(

0 commit comments

Comments
 (0)