aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@gmail.com>2019-04-10 14:34:46 -0400
committerJames O'Beirne <james.obeirne@gmail.com>2019-07-08 11:33:13 -0400
commit682a1d0f2004d808b87b3106d0dfae547005e638 (patch)
tree33d9bcfcc7dd0614af9a379420a5a698b29cf7be /src/rpc
parent55d525ab9004631d30dcc60a1ec5d9cd6c6afe56 (diff)
refactoring: remove mapBlockIndex global
in lieu of ::BlockIndex().
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/blockchain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 743efc1e65..b1027dffdb 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -1456,7 +1456,7 @@ static UniValue getchaintips(const JSONRPCRequest& request)
/*
* Idea: the set of chain tips is ::ChainActive().tip, plus orphan blocks which do not have another orphan building off of them.
* Algorithm:
- * - Make one pass through mapBlockIndex, picking out the orphan blocks, and also storing a set of the orphan block's pprev pointers.
+ * - Make one pass through g_blockman.m_block_index, picking out the orphan blocks, and also storing a set of the orphan block's pprev pointers.
* - Iterate through the orphan blocks. If the block isn't pointed to by another orphan, it is a chain tip.
* - add ::ChainActive().Tip()
*/
@@ -1464,7 +1464,7 @@ static UniValue getchaintips(const JSONRPCRequest& request)
std::set<const CBlockIndex*> setOrphans;
std::set<const CBlockIndex*> setPrevs;
- for (const std::pair<const uint256, CBlockIndex*>& item : mapBlockIndex)
+ for (const std::pair<const uint256, CBlockIndex*>& item : ::BlockIndex())
{
if (!::ChainActive().Contains(item.second)) {
setOrphans.insert(item.second);