aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-04-25 11:29:37 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2017-06-01 12:43:16 -0700
commit13870b56fcd0bfacedce3ae42a3de3d5e9dc7bc1 (patch)
tree874be8e8f747c15d337df1f7b5b94875aac8fb68 /src/rpc
parent05293f3cb75ad08ca23cba8e795e27d4d5e4d690 (diff)
downloadbitcoin-13870b56fcd0bfacedce3ae42a3de3d5e9dc7bc1.tar.xz
Replace CCoins-based CTxMemPool::pruneSpent with isSpent
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/blockchain.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index e59b9b86bb..94e42a8644 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -973,9 +973,8 @@ UniValue gettxout(const JSONRPCRequest& request)
if (fMempool) {
LOCK(mempool.cs);
CCoinsViewMemPool view(pcoinsTip, mempool);
- if (!view.GetCoins(hash, coins))
+ if (!view.GetCoins(hash, coins) || mempool.isSpent(COutPoint(hash, n))) // TODO: this should be done by the CCoinsViewMemPool
return NullUniValue;
- mempool.pruneSpent(hash, coins); // TODO: this should be done by the CCoinsViewMemPool
} else {
if (!pcoinsTip->GetCoins(hash, coins))
return NullUniValue;