diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1172,7 +1172,6 @@ LOCK(g_mempool.cs); CCoinsViewMemPool view(pcoinsTip.get(), g_mempool); if (!view.GetCoin(out, coin) || g_mempool.isSpent(out)) { - // TODO: this should be done by the CCoinsViewMemPool return NullUniValue; } } else { diff --git a/src/txmempool.h b/src/txmempool.h --- a/src/txmempool.h +++ b/src/txmempool.h @@ -770,6 +770,13 @@ /** * CCoinsView that brings transactions from a memorypool into view. * It does not check for spendings by memory pool transactions. + * Instead, it provides access to all Coins which are either unspent in the + * base CCoinsView, or are outputs from any mempool transaction! + * This allows transaction replacement to work as expected, as you want to + * have all inputs "available" to check signatures, and any cycles in the + * dependency graph are checked directly in AcceptToMemoryPool. + * It also allows you to sign a double-spend directly in signrawtransaction, + * as long as the conflicting transaction is not yet confirmed. */ class CCoinsViewMemPool : public CCoinsViewBacked { protected: