aboutsummaryrefslogtreecommitdiff
path: root/src/checkpoints.cpp
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-01-12 00:23:09 +0000
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-03-06 19:52:19 +0000
commit92fabcd443322dcfdf2b3477515fae79e8647d86 (patch)
tree5511c22adffa3eaccb75afdd2ec53c81550ff7d3 /src/checkpoints.cpp
parent43a32b739551b5a6cac8102afd52e2b9efc81726 (diff)
Add LookupBlockIndex function
Diffstat (limited to 'src/checkpoints.cpp')
-rw-r--r--src/checkpoints.cpp7
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;
}