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()
318318 return true ;
319319}
320320
321- bool BlockManager::LoadBlockIndexDB ()
321+ bool BlockManager::LoadBlockIndexDB (const Consensus::Params& consensus_params )
322322{
323- if (!LoadBlockIndex (:: Params (). GetConsensus () )) {
323+ if (!LoadBlockIndex (consensus_params )) {
324324 return false ;
325325 }
326326
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ class BlockManager
153153 std::unique_ptr<CBlockTreeDB> m_block_tree_db GUARDED_BY (::cs_main);
154154
155155 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);
157157
158158 CBlockIndex* AddToBlockIndex (const CBlockHeader& block, CBlockIndex*& best_header) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
159159 /* * 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()
41584158 // Load block index from databases
41594159 bool needs_init = fReindex ;
41604160 if (!fReindex ) {
4161- bool ret = m_blockman.LoadBlockIndexDB ();
4161+ bool ret = m_blockman.LoadBlockIndexDB (GetConsensus () );
41624162 if (!ret) return false ;
41634163
41644164 std::vector<CBlockIndex*> vSortedByHeight{m_blockman.GetAllBlockIndices ()};
You can’t perform that action at this time.
0 commit comments