Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.h
Show First 20 Lines • Show All 772 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
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; | ||||
bool HaveCoin(const COutPoint &outpoint) const override; | |||||
}; | }; | ||||
// We want to sort transactions by coin age priority | // We want to sort transactions by coin age priority | ||||
typedef std::pair<double, CTxMemPool::txiter> TxCoinAgePriority; | typedef std::pair<double, CTxMemPool::txiter> TxCoinAgePriority; | ||||
struct TxCoinAgePriorityCompare { | struct TxCoinAgePriorityCompare { | ||||
bool operator()(const TxCoinAgePriority &a, const TxCoinAgePriority &b) { | bool operator()(const TxCoinAgePriority &a, const TxCoinAgePriority &b) { | ||||
if (a.first == b.first) { | if (a.first == b.first) { | ||||
▲ Show 20 Lines • Show All 129 Lines • Show Last 20 Lines |