Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.h
Show First 20 Lines • Show All 490 Lines • ▼ Show 20 Lines | private: | ||||
mutable int64_t lastRollingFeeUpdate; | mutable int64_t lastRollingFeeUpdate; | ||||
mutable bool blockSinceLastRollingFeeBump; | mutable bool blockSinceLastRollingFeeBump; | ||||
//!< minimum fee to get into the pool, decreases exponentially | //!< minimum fee to get into the pool, decreases exponentially | ||||
mutable double rollingMinimumFeeRate; | mutable double rollingMinimumFeeRate; | ||||
void trackPackageRemoved(const CFeeRate &rate) EXCLUSIVE_LOCKS_REQUIRED(cs); | void trackPackageRemoved(const CFeeRate &rate) EXCLUSIVE_LOCKS_REQUIRED(cs); | ||||
bool m_is_loaded GUARDED_BY(cs){false}; | |||||
public: | public: | ||||
// public only for testing | // public only for testing | ||||
static const int ROLLING_FEE_HALFLIFE = 60 * 60 * 12; | static const int ROLLING_FEE_HALFLIFE = 60 * 60 * 12; | ||||
typedef boost::multi_index_container< | typedef boost::multi_index_container< | ||||
CTxMemPoolEntry, boost::multi_index::indexed_by< | CTxMemPoolEntry, boost::multi_index::indexed_by< | ||||
// sorted by txid | // sorted by txid | ||||
boost::multi_index::hashed_unique< | boost::multi_index::hashed_unique< | ||||
▲ Show 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Calculate the ancestor and descendant count for the given transaction. | * Calculate the ancestor and descendant count for the given transaction. | ||||
* The counts include the transaction itself. | * The counts include the transaction itself. | ||||
*/ | */ | ||||
void GetTransactionAncestry(const uint256 &txid, size_t &ancestors, | void GetTransactionAncestry(const uint256 &txid, size_t &ancestors, | ||||
size_t &descendants) const; | size_t &descendants) const; | ||||
/** @returns true if the mempool is fully loaded */ | |||||
bool IsLoaded() const; | |||||
/** Sets the current loaded state */ | |||||
void SetIsLoaded(bool loaded); | |||||
unsigned long size() const { | unsigned long size() const { | ||||
LOCK(cs); | LOCK(cs); | ||||
return mapTx.size(); | return mapTx.size(); | ||||
} | } | ||||
uint64_t GetTotalTxSize() const { | uint64_t GetTotalTxSize() const { | ||||
LOCK(cs); | LOCK(cs); | ||||
return totalTxSize; | return totalTxSize; | ||||
▲ Show 20 Lines • Show All 225 Lines • Show Last 20 Lines |