@@ -1945,7 +1945,9 @@ bool CheckInputs(const CTransaction& tx, CValidationState& state, const CCoinsVi
19451945
19461946bool DisconnectBlock (CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& view, bool * pfClean)
19471947{
1948- assert (pindex->GetBlockHash () == view.GetBestBlock ());
1948+ if (pindex->GetBlockHash () != view.GetBestBlock ())
1949+ LogPrintf (" %s : pindex=%s view=%s\n " , __func__, pindex->GetBlockHash ().GetHex (), view.GetBestBlock ().GetHex ());
1950+ assert (pindex->GetBlockHash () == view.GetBestBlock ());
19491951
19501952 if (pfClean)
19511953 *pfClean = false ;
@@ -3674,7 +3676,7 @@ bool static LoadBlockIndexDB()
36743676 // Calculate nChainWork
36753677 vector<pair<int , CBlockIndex*> > vSortedByHeight;
36763678 vSortedByHeight.reserve (mapBlockIndex.size ());
3677- BOOST_FOREACH (const PAIRTYPE (uint256, CBlockIndex*) & item, mapBlockIndex) {
3679+ for (const PAIRTYPE (uint256, CBlockIndex*) & item : mapBlockIndex) {
36783680 CBlockIndex* pindex = item.second ;
36793681 vSortedByHeight.push_back (make_pair (pindex->nHeight , pindex));
36803682 }
@@ -3724,7 +3726,7 @@ bool static LoadBlockIndexDB()
37243726 // Check presence of blk files
37253727 LogPrintf (" Checking all blk files are present...\n " );
37263728 set<int > setBlkDataFiles;
3727- BOOST_FOREACH (const PAIRTYPE (uint256, CBlockIndex*) & item, mapBlockIndex) {
3729+ for (const PAIRTYPE (uint256, CBlockIndex*) & item : mapBlockIndex) {
37283730 CBlockIndex* pindex = item.second ;
37293731 if (pindex->nStatus & BLOCK_HAVE_DATA) {
37303732 setBlkDataFiles.insert (pindex->nFile );
0 commit comments