diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2018-01-12 00:23:09 +0000 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2018-03-06 19:52:19 +0000 |
commit | 92fabcd443322dcfdf2b3477515fae79e8647d86 (patch) | |
tree | 5511c22adffa3eaccb75afdd2ec53c81550ff7d3 /src/checkpoints.cpp | |
parent | 43a32b739551b5a6cac8102afd52e2b9efc81726 (diff) |
Add LookupBlockIndex function
Diffstat (limited to 'src/checkpoints.cpp')
-rw-r--r-- | src/checkpoints.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index 9189c9a8ad..816d854db3 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -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; } |