aboutsummaryrefslogtreecommitdiff
path: root/src/rest.cpp
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/rest.cpp
parent05293f3cb75ad08ca23cba8e795e27d4d5e4d690 (diff)
Replace CCoins-based CTxMemPool::pruneSpent with isSpent
Diffstat (limited to 'src/rest.cpp')
-rw-r--r--src/rest.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rest.cpp b/src/rest.cpp
index 9c291fe0a9..4a71010094 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -513,8 +513,7 @@ static bool rest_getutxos(HTTPRequest* req, const std::string& strURIPart)
uint256 hash = vOutPoints[i].hash;
bool hit = false;
if (view.GetCoins(hash, coins)) {
- mempool.pruneSpent(hash, coins);
- if (coins.IsAvailable(vOutPoints[i].n)) {
+ if (coins.IsAvailable(vOutPoints[i].n) && !mempool.isSpent(vOutPoints[i])) {
hit = true;
// Safe to index into vout here because IsAvailable checked if it's off the end of the array, or if
// n is valid but points to an already spent output (IsNull).