Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.h
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | |||||
class CTxMemPoolEntry { | class CTxMemPoolEntry { | ||||
private: | private: | ||||
CTransactionRef tx; | CTransactionRef tx; | ||||
//!< Cached to avoid expensive parent-transaction lookups | //!< Cached to avoid expensive parent-transaction lookups | ||||
Amount nFee; | Amount nFee; | ||||
//!< ... and avoid recomputing tx size | //!< ... and avoid recomputing tx size | ||||
size_t nTxSize; | size_t nTxSize; | ||||
//!< ... and billable size for billing | |||||
size_t nTxBillableSize; | |||||
//!< ... and modified size for priority | //!< ... and modified size for priority | ||||
size_t nModSize; | size_t nModSize; | ||||
//!< ... and total memory usage | //!< ... and total memory usage | ||||
size_t nUsageSize; | size_t nUsageSize; | ||||
//!< Local time when entering the mempool | //!< Local time when entering the mempool | ||||
int64_t nTime; | int64_t nTime; | ||||
//!< Priority when entering the mempool | //!< Priority when entering the mempool | ||||
double entryPriority; | double entryPriority; | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | public: | ||||
CTransactionRef GetSharedTx() const { return this->tx; } | CTransactionRef GetSharedTx() const { return this->tx; } | ||||
/** | /** | ||||
* Fast calculation of lower bound of current priority as update from entry | * Fast calculation of lower bound of current priority as update from entry | ||||
* priority. Only inputs that were originally in-chain will age. | * priority. Only inputs that were originally in-chain will age. | ||||
*/ | */ | ||||
double GetPriority(unsigned int currentHeight) const; | double GetPriority(unsigned int currentHeight) const; | ||||
const Amount GetFee() const { return nFee; } | const Amount GetFee() const { return nFee; } | ||||
size_t GetTxSize() const { return nTxSize; } | size_t GetTxSize() const { return nTxSize; } | ||||
size_t GetTxBillableSize() const { return nTxBillableSize; } | |||||
int64_t GetTime() const { return nTime; } | int64_t GetTime() const { return nTime; } | ||||
unsigned int GetHeight() const { return entryHeight; } | unsigned int GetHeight() const { return entryHeight; } | ||||
int64_t GetSigOpCount() const { return sigOpCount; } | int64_t GetSigOpCount() const { return sigOpCount; } | ||||
Amount GetModifiedFee() const { return nFee + feeDelta; } | Amount GetModifiedFee() const { return nFee + feeDelta; } | ||||
size_t DynamicMemoryUsage() const { return nUsageSize; } | size_t DynamicMemoryUsage() const { return nUsageSize; } | ||||
const LockPoints &GetLockPoints() const { return lockPoints; } | const LockPoints &GetLockPoints() const { return lockPoints; } | ||||
// Adjusts the descendant state, if this entry is not dirty. | // Adjusts the descendant state, if this entry is not dirty. | ||||
▲ Show 20 Lines • Show All 744 Lines • Show Last 20 Lines |