mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
Clarify CCoinsViewMemPool documentation.
Thanks to @sdaftuar for correcting my misunderstanding.
This commit is contained in:
parent
acb11535cb
commit
381b8fc365
@ -991,7 +991,7 @@ UniValue gettxout(const JSONRPCRequest& request)
|
|||||||
if (fMempool) {
|
if (fMempool) {
|
||||||
LOCK(mempool.cs);
|
LOCK(mempool.cs);
|
||||||
CCoinsViewMemPool view(pcoinsTip, mempool);
|
CCoinsViewMemPool view(pcoinsTip, mempool);
|
||||||
if (!view.GetCoin(out, coin) || mempool.isSpent(out)) { // TODO: filtering spent coins should be done by the CCoinsViewMemPool
|
if (!view.GetCoin(out, coin) || mempool.isSpent(out)) {
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -676,6 +676,13 @@ private:
|
|||||||
/**
|
/**
|
||||||
* CCoinsView that brings transactions from a memorypool into view.
|
* CCoinsView that brings transactions from a memorypool into view.
|
||||||
* It does not check for spendings by memory pool transactions.
|
* 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
|
class CCoinsViewMemPool : public CCoinsViewBacked
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user