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 @@ -676,6 +676,13 @@ class CTxMemPool
676
676
/* *
677
677
* CCoinsView that brings transactions from a memorypool into view.
678
678
* It does not check for spendings by memory pool transactions.
679
+ * Instead, it provides access to all Coins which are either unspent in the
680
+ * base CCoinsView, or are outputs from any mempool transaction!
681
+ * This allows transaction replacement to work as expected, as you want to
682
+ * have all inputs "available" to check signatures, and any cycles in the
683
+ * dependency graph are checked directly in AcceptToMemoryPool.
684
+ * It also allows you to sign a double-spend directly in signrawtransaction,
685
+ * as long as the conflicting transaction is not yet confirmed.
679
686
*/
680
687
class CCoinsViewMemPool : public CCoinsViewBacked
681
688
{
You can’t perform that action at this time.
0 commit comments