Add LookupBlockIndex function

This commit is contained in:
João Barbosa
2018-01-12 00:23:09 +00:00
parent 43a32b7395
commit 92fabcd443
14 changed files with 139 additions and 133 deletions

View File

@@ -21,9 +21,10 @@ namespace Checkpoints {
for (const MapCheckpoints::value_type& i : reverse_iterate(checkpoints))
{
const uint256& hash = i.second;
BlockMap::const_iterator t = mapBlockIndex.find(hash);
if (t != mapBlockIndex.end())
return t->second;
CBlockIndex* pindex = LookupBlockIndex(hash);
if (pindex) {
return pindex;
}
}
return nullptr;
}