aboutsummaryrefslogtreecommitdiff
path: root/src/rpcwallet.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2013-10-12 15:18:08 +0200
committerPieter Wuille <sipa@ulyssis.org>2013-10-15 11:09:29 +0200
commite4daecda0bcd47a2672eb625232f00e388a3cd87 (patch)
treecc58a832fbf4ccac98abdb3c2c6f16fe120f3c45 /src/rpcwallet.cpp
parentb2ba55c42b563418e7be4adb38cdbf1852e6c78d (diff)
Reimplement CBlockLocator's chain-related logic in CChain.
This removes a few unused CBlockLocator methods, and moves the construction and fork-finding logic to CChain (which can do these more efficiently, as it has a height-indexable chain available). It also makes CBlockLocator independent from the validation code.
Diffstat (limited to 'src/rpcwallet.cpp')
-rw-r--r--src/rpcwallet.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 433cc8b735..f7341f7b69 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1169,7 +1169,9 @@ Value listsinceblock(const Array& params, bool fHelp)
uint256 blockId = 0;
blockId.SetHex(params[0].get_str());
- pindex = CBlockLocator(blockId).GetBlockIndex();
+ std::map<uint256, CBlockIndex*>::iterator it = mapBlockIndex.find(blockId);
+ if (it != mapBlockIndex.end())
+ pindex = it->second;
}
if (params.size() > 1)