File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -318,9 +318,9 @@ bool BlockManager::WriteBlockIndexDB()
318
318
return true ;
319
319
}
320
320
321
- bool BlockManager::LoadBlockIndexDB ()
321
+ bool BlockManager::LoadBlockIndexDB (const Consensus::Params& consensus_params )
322
322
{
323
- if (!LoadBlockIndex (:: Params (). GetConsensus () )) {
323
+ if (!LoadBlockIndex (consensus_params )) {
324
324
return false ;
325
325
}
326
326
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ class BlockManager
153
153
std::unique_ptr<CBlockTreeDB> m_block_tree_db GUARDED_BY (::cs_main);
154
154
155
155
bool WriteBlockIndexDB () EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
156
- bool LoadBlockIndexDB () EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
156
+ bool LoadBlockIndexDB (const Consensus::Params& consensus_params ) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
157
157
158
158
CBlockIndex* AddToBlockIndex (const CBlockHeader& block, CBlockIndex*& best_header) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
159
159
/* * Create a new block index entry for a given block hash */
Original file line number Diff line number Diff line change @@ -4158,7 +4158,7 @@ bool ChainstateManager::LoadBlockIndex()
4158
4158
// Load block index from databases
4159
4159
bool needs_init = fReindex ;
4160
4160
if (!fReindex ) {
4161
- bool ret = m_blockman.LoadBlockIndexDB ();
4161
+ bool ret = m_blockman.LoadBlockIndexDB (GetConsensus () );
4162
4162
if (!ret) return false ;
4163
4163
4164
4164
std::vector<CBlockIndex*> vSortedByHeight{m_blockman.GetAllBlockIndices ()};
You can’t perform that action at this time.
0 commit comments