aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-08-09 17:08:22 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2017-11-09 16:53:34 +0100
commitd223bc940a16712f221f634047408e8771dff26c (patch)
tree2dcf31ccfdc50d7502a4626b21ace3d1613d45c1 /src/rpc
parentb45c597caadabbf10a1e34f2c9ee1d0916164eee (diff)
Use unique_ptr for pcoinscatcher/pcoinsdbview/pcoinsTip/pblocktree
* pcoinscatcher (CCoinsViewErrorCatcher) * pcoinsdbview (CCoinsViewDB) * pcoinsTip (CCoinsViewCache) * pblocktree (CBlockTreeDB) * Remove variables shadowing pcoinsdbview
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/blockchain.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 8d01d8ba9c..4a3404308d 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -928,7 +928,7 @@ UniValue gettxoutsetinfo(const JSONRPCRequest& request)
CCoinsStats stats;
FlushStateToDisk();
- if (GetUTXOStats(pcoinsdbview, stats)) {
+ if (GetUTXOStats(pcoinsdbview.get(), stats)) {
ret.push_back(Pair("height", (int64_t)stats.nHeight));
ret.push_back(Pair("bestblock", stats.hashBlock.GetHex()));
ret.push_back(Pair("transactions", (int64_t)stats.nTransactions));
@@ -996,7 +996,7 @@ UniValue gettxout(const JSONRPCRequest& request)
Coin coin;
if (fMempool) {
LOCK(mempool.cs);
- CCoinsViewMemPool view(pcoinsTip, mempool);
+ CCoinsViewMemPool view(pcoinsTip.get(), mempool);
if (!view.GetCoin(out, coin) || mempool.isSpent(out)) {
return NullUniValue;
}
@@ -1048,7 +1048,7 @@ UniValue verifychain(const JSONRPCRequest& request)
if (!request.params[1].isNull())
nCheckDepth = request.params[1].get_int();
- return CVerifyDB().VerifyDB(Params(), pcoinsTip, nCheckLevel, nCheckDepth);
+ return CVerifyDB().VerifyDB(Params(), pcoinsTip.get(), nCheckLevel, nCheckDepth);
}
/** Implementation of IsSuperMajority with better feedback */