Skip to content

Commit fa1970f

Browse files
author
MarcoFalke
committed
Make BlockManager::LoadBlockIndex private
1 parent 9076597 commit fa1970f

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
@@ -80,6 +80,13 @@ class BlockManager
8080
friend ChainstateManager;
8181

8282
private:
83+
/**
84+
* Load the blocktree off disk and into memory. Populate certain metadata
85+
* per index entry (nStatus, nChainWork, nTimeMax, etc.) as well as peripheral
86+
* collections like m_dirty_blockindex.
87+
*/
88+
bool LoadBlockIndex(const Consensus::Params& consensus_params)
89+
EXCLUSIVE_LOCKS_REQUIRED(cs_main);
8390
void FlushBlockFile(bool fFinalize = false, bool finalize_undo = false);
8491
void FlushUndoFile(int block_file, bool finalize = false);
8592
bool FindBlockPos(FlatFilePos& pos, unsigned int nAddSize, unsigned int nHeight, CChain& active_chain, uint64_t nTime, bool fKnown);
@@ -136,14 +143,6 @@ class BlockManager
136143
bool WriteBlockIndexDB() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
137144
bool LoadBlockIndexDB() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
138145

139-
/**
140-
* Load the blocktree off disk and into memory. Populate certain metadata
141-
* per index entry (nStatus, nChainWork, nTimeMax, etc.) as well as peripheral
142-
* collections like m_dirty_blockindex.
143-
*/
144-
bool LoadBlockIndex(const Consensus::Params& consensus_params)
145-
EXCLUSIVE_LOCKS_REQUIRED(cs_main);
146-
147146
/** Clear all data members. */
148147
void Unload() EXCLUSIVE_LOCKS_REQUIRED(cs_main);
149148

src/validation.h

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

839839
CBlockIndex* m_best_invalid;
840-
friend bool node::BlockManager::LoadBlockIndex(const Consensus::Params&);
841840

842841
//! Internal helper for ActivateSnapshot().
843842
[[nodiscard]] bool PopulateAndValidateSnapshot(

0 commit comments

Comments
 (0)