MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetLastCheckpoint

Method GetLastCheckpoint

src/node/blockstorage.cpp:428–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428CBlockIndex* BlockManager::GetLastCheckpoint(const CCheckpointData& data)
429{
430 const MapCheckpoints& checkpoints = data.mapCheckpoints;
431
432 for (const MapCheckpoints::value_type& i : reverse_iterate(checkpoints)) {
433 const uint256& hash = i.second;
434 CBlockIndex* pindex = LookupBlockIndex(hash);
435 if (pindex) {
436 return pindex;
437 }
438 }
439 return nullptr;
440}
441
442bool IsBlockPruned(const CBlockIndex* pblockindex)
443{

Callers 1

EXCLUSIVE_LOCKS_REQUIREDFunction · 0.80

Calls 1

reverse_iterateFunction · 0.85

Tested by

no test coverage detected