// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.hpp> // for 'map_list_of()'
-#include <boost/foreach.hpp>
#include <algorithm>
#include "checkpoints.h"
{
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<uint256, CBlockIndex*>::const_iterator t = mapBlockIndex.find(hash);
+ const uint256& hash = it->second.first;
+ auto t = mapBlockIndex.find(hash);
if (t != mapBlockIndex.end())
return t->second;
}
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))