X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fmain.cpp;h=0d19e8b611090af3b20296565a8ed7b1e8a04eaf;hp=f62b1e967a42eca3db512a22b3b010ab3518406b;hb=6bd80c2d737da9422283de5dd3033e318dcb96b7;hpb=40530c08006088e6f610063f1c49428aa0b272f6 diff --git a/src/main.cpp b/src/main.cpp index f62b1e9..0d19e8b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1970,10 +1970,10 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew) } // Connect further blocks - BOOST_REVERSE_FOREACH(CBlockIndex *pindex, vpindexSecondary) + for (std::vector::reverse_iterator rit = vpindexSecondary.rbegin(); rit != vpindexSecondary.rend(); ++rit) { CBlock block; - if (!block.ReadFromDisk(pindex)) + if (!block.ReadFromDisk(*rit)) { printf("SetBestChain() : ReadFromDisk failed\n"); break; @@ -1983,7 +1983,7 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew) break; } // errors now are not fatal, we still did a reorganisation to a new chain in a valid way - if (!block.SetBestChainInner(txdb, pindex)) + if (!block.SetBestChainInner(txdb, *rit)) break; } }