Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.h
Show First 20 Lines • Show All 936 Lines • ▼ Show 20 Lines | class CCoinsViewMemPool : public CCoinsViewBacked { | ||||
std::unordered_map<COutPoint, Coin, SaltedOutpointHasher> m_temp_added; | std::unordered_map<COutPoint, Coin, SaltedOutpointHasher> m_temp_added; | ||||
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; | ||||
/** Add the coins created by this transaction. */ | /** | ||||
* Add the coins created by this transaction. These coins are only | |||||
* temporarily stored in m_temp_added and cannot be flushed to the back end. | |||||
* Only used for package validation. | |||||
*/ | |||||
void PackageAddTransaction(const CTransactionRef &tx); | void PackageAddTransaction(const CTransactionRef &tx); | ||||
}; | }; | ||||
/** | /** | ||||
* DisconnectedBlockTransactions | * DisconnectedBlockTransactions | ||||
* | * | ||||
* During the reorg, it's desirable to re-add previously confirmed transactions | * During the reorg, it's desirable to re-add previously confirmed transactions | ||||
* to the mempool, so that anything not re-confirmed in the new chain is | * to the mempool, so that anything not re-confirmed in the new chain is | ||||
▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines |