Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.h
Show First 20 Lines • Show All 789 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* 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 | * Instead, it provides access to all Coins which are either unspent in the | ||||
* base CCoinsView, or are outputs from any mempool transaction! | * base CCoinsView, or are outputs from any mempool transaction! | ||||
* This allows transaction replacement to work as expected, as you want to | * This allows transaction replacement to work as expected, as you want to | ||||
* have all inputs "available" to check signatures, and any cycles in the | * have all inputs "available" to check signatures, and any cycles in the | ||||
* dependency graph are checked directly in AcceptToMemoryPool. | * dependency graph are checked directly in AcceptToMemoryPool. | ||||
* It also allows you to sign a double-spend directly in signrawtransaction, | * It also allows you to sign a double-spend directly in | ||||
* as long as the conflicting transaction is not yet confirmed. | * signrawtransactionwithkey and signrawtransactionwithwallet, as long as the | ||||
* conflicting transaction is not yet confirmed. | |||||
*/ | */ | ||||
class CCoinsViewMemPool : public CCoinsViewBacked { | class CCoinsViewMemPool : public CCoinsViewBacked { | ||||
protected: | protected: | ||||
const CTxMemPool &mempool; | const CTxMemPool &mempool; | ||||
public: | public: | ||||
CCoinsViewMemPool(CCoinsView *baseIn, const CTxMemPool &mempoolIn); | CCoinsViewMemPool(CCoinsView *baseIn, const CTxMemPool &mempoolIn); | ||||
bool GetCoin(const COutPoint &outpoint, Coin &coin) const override; | bool GetCoin(const COutPoint &outpoint, Coin &coin) const override; | ||||
▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines |