MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / GetLastCheckpoint

Function GetLastCheckpoint

src/checkpoints.cpp:76–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74 }
75
76 CBlockIndex* GetLastCheckpoint(const CCheckpointData& data)
77 {
78 const MapCheckpoints& checkpoints = data.mapCheckpoints;
79
80 BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, checkpoints)
81 {
82 const uint256& hash = i.second;
83 BlockMap::const_iterator t = mapBlockIndex.find(hash);
84 if (t != mapBlockIndex.end())
85 return t->second;
86 }
87 return NULL;
88 }
89
90} // namespace Checkpoints

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected