Replace CCoins-based CTxMemPool::pruneSpent with isSpent

This commit is contained in:
Pieter Wuille
2017-04-25 11:29:37 -07:00
parent 05293f3cb7
commit 13870b56fc
4 changed files with 5 additions and 14 deletions

View File

@@ -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;