X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fcheckpoints.cpp;fp=src%2Fcheckpoints.cpp;h=ae591887e3a903faa0234b2deafec109793694a7;hp=75ed22a417b56fa509066afb12f0a77084d56f47;hb=5098ea454db9132aa0f576921ca9d1a69429d146;hpb=47d3ceb3da845e216fc9577cbf52f8b5600e5f93 diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index 75ed22a..ae59188 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -3,7 +3,6 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include // for 'map_list_of()' -#include #include #include "checkpoints.h" @@ -86,10 +85,10 @@ namespace Checkpoints { MapCheckpoints& checkpoints = (fTestNet ? mapCheckpointsTestnet : mapCheckpoints); - BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, checkpoints) + for(auto it = checkpoints.rbegin(); it != checkpoints.rend(); ++it) { - const uint256& hash = i.second.first; - std::map::const_iterator t = mapBlockIndex.find(hash); + const uint256& hash = it->second.first; + auto t = mapBlockIndex.find(hash); if (t != mapBlockIndex.end()) return t->second; } @@ -294,9 +293,9 @@ namespace Checkpoints printf("ResetSyncCheckpoint: pending for sync-checkpoint %s\n", hashPendingCheckpoint.ToString().c_str()); } - BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, mapCheckpoints) + for(auto it = mapCheckpoints.rbegin(); it != mapCheckpoints.rend(); ++it) { - const uint256& hash = i.second.first; + const uint256& hash = it->second.first; if (mapBlockIndex.count(hash) && mapBlockIndex[hash]->IsInMainChain()) { if (!WriteSyncCheckpoint(hash))