File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -991,7 +991,7 @@ UniValue gettxout(const JSONRPCRequest& request)
991
991
if (fMempool ) {
992
992
LOCK (mempool.cs );
993
993
CCoinsViewMemPool view (pcoinsTip, mempool);
994
- if (!view.GetCoin (out, coin) || mempool.isSpent (out)) { // TODO: filtering spent coins should be done by the CCoinsViewMemPool
994
+ if (!view.GetCoin (out, coin) || mempool.isSpent (out)) {
995
995
return NullUniValue;
996
996
}
997
997
} else {
Original file line number Diff line number Diff line change @@ -669,6 +669,13 @@ class CTxMemPool
669
669
/* *
670
670
* CCoinsView that brings transactions from a memorypool into view.
671
671
* It does not check for spendings by memory pool transactions.
672
+ * Instead, it provides access to all Coins which are either unspent in the
673
+ * base CCoinsView, or are outputs from any mempool transaction!
674
+ * This allows transaction replacement to work as expected, as you want to
675
+ * have all inputs "available" to check signatures, and any cycles in the
676
+ * dependency graph are checked directly in AcceptToMemoryPool.
677
+ * It also allows you to sign a double-spend directly in signrawtransaction,
678
+ * as long as the conflicting transaction is not yet confirmed.
672
679
*/
673
680
class CCoinsViewMemPool : public CCoinsViewBacked
674
681
{
You can’t perform that action at this time.
0 commit comments