@@ -3764,10 +3764,10 @@ void BlockManager::Unload() {
3764
3764
m_block_index.clear ();
3765
3765
}
3766
3766
3767
- bool CChainState ::LoadBlockIndexDB ()
3767
+ bool BlockManager ::LoadBlockIndexDB (std::set<CBlockIndex*, CBlockIndexWorkComparator>& setBlockIndexCandidates )
3768
3768
{
3769
- if (!m_blockman. LoadBlockIndex (
3770
- m_params .GetConsensus (), *pblocktree,
3769
+ if (!LoadBlockIndex (
3770
+ ::Params () .GetConsensus(), *pblocktree,
3771
3771
setBlockIndexCandidates)) {
3772
3772
return false ;
3773
3773
}
@@ -3792,7 +3792,7 @@ bool CChainState::LoadBlockIndexDB()
3792
3792
// Check presence of blk files
3793
3793
LogPrintf (" Checking all blk files are present...\n " );
3794
3794
std::set<int > setBlkDataFiles;
3795
- for (const std::pair<const uint256, CBlockIndex*>& item : m_blockman. m_block_index ) {
3795
+ for (const std::pair<const uint256, CBlockIndex*>& item : m_block_index) {
3796
3796
CBlockIndex* pindex = item.second ;
3797
3797
if (pindex->nStatus & BLOCK_HAVE_DATA) {
3798
3798
setBlkDataFiles.insert (pindex->nFile );
@@ -4114,7 +4114,7 @@ bool ChainstateManager::LoadBlockIndex()
4114
4114
// Load block index from databases
4115
4115
bool needs_init = fReindex ;
4116
4116
if (!fReindex ) {
4117
- bool ret = ActiveChainstate ().LoadBlockIndexDB ( );
4117
+ bool ret = m_blockman. LoadBlockIndexDB ( ActiveChainstate ().setBlockIndexCandidates );
4118
4118
if (!ret) return false ;
4119
4119
needs_init = m_blockman.m_block_index .empty ();
4120
4120
}
0 commit comments