Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.h
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | private: | ||||
// | // | ||||
// Information about descendants of this transaction that are in the | // Information about descendants of this transaction that are in the | ||||
// mempool; if we remove this transaction we must remove all of these | // mempool; if we remove this transaction we must remove all of these | ||||
// descendants as well. | // descendants as well. | ||||
//! number of descendant transactions | //! number of descendant transactions | ||||
uint64_t nCountWithDescendants{1}; | uint64_t nCountWithDescendants{1}; | ||||
//! ... and size | //! ... and size | ||||
uint64_t nSizeWithDescendants; | uint64_t nSizeWithDescendants; | ||||
//! ... and total fees (all including us) | |||||
Amount nModFeesWithDescendants; | |||||
//! ... and sichecks | //! ... and sichecks | ||||
int64_t nSigChecksWithDescendants; | int64_t nSigChecksWithDescendants; | ||||
// Analogous statistics for ancestor transactions | // Analogous statistics for ancestor transactions | ||||
uint64_t nCountWithAncestors{1}; | uint64_t nCountWithAncestors{1}; | ||||
uint64_t nSizeWithAncestors; | uint64_t nSizeWithAncestors; | ||||
Amount nModFeesWithAncestors; | |||||
int64_t nSigChecksWithAncestors; | int64_t nSigChecksWithAncestors; | ||||
public: | public: | ||||
CTxMemPoolEntry(const CTransactionRef &_tx, const Amount fee, int64_t time, | CTxMemPoolEntry(const CTransactionRef &_tx, const Amount fee, int64_t time, | ||||
unsigned int entry_height, bool spends_coinbase, | unsigned int entry_height, bool spends_coinbase, | ||||
int64_t sigchecks, LockPoints lp); | int64_t sigchecks, LockPoints lp); | ||||
uint64_t GetEntryId() const { return entryId; } | uint64_t GetEntryId() const { return entryId; } | ||||
Show All 12 Lines | public: | ||||
int64_t GetSigChecks() const { return sigChecks; } | int64_t GetSigChecks() const { return sigChecks; } | ||||
Amount GetModifiedFee() const { return nFee + feeDelta; } | Amount GetModifiedFee() const { return nFee + feeDelta; } | ||||
CFeeRate GetModifiedFeeRate() const { | CFeeRate GetModifiedFeeRate() const { | ||||
return CFeeRate(GetModifiedFee(), GetTxVirtualSize()); | return CFeeRate(GetModifiedFee(), GetTxVirtualSize()); | ||||
} | } | ||||
size_t DynamicMemoryUsage() const { return nUsageSize; } | size_t DynamicMemoryUsage() const { return nUsageSize; } | ||||
const LockPoints &GetLockPoints() const { return lockPoints; } | const LockPoints &GetLockPoints() const { return lockPoints; } | ||||
// Updates the fee delta used for mining priority score, and the | // Updates the fee delta used for mining priority score | ||||
// modified fees with descendants. | |||||
void UpdateFeeDelta(Amount feeDelta); | void UpdateFeeDelta(Amount feeDelta); | ||||
// Update the LockPoints after a reorg | // Update the LockPoints after a reorg | ||||
void UpdateLockPoints(const LockPoints &lp); | void UpdateLockPoints(const LockPoints &lp); | ||||
uint64_t GetCountWithDescendants() const { return nCountWithDescendants; } | uint64_t GetCountWithDescendants() const { return nCountWithDescendants; } | ||||
uint64_t GetSizeWithDescendants() const { return nSizeWithDescendants; } | uint64_t GetSizeWithDescendants() const { return nSizeWithDescendants; } | ||||
uint64_t GetVirtualSizeWithDescendants() const; | uint64_t GetVirtualSizeWithDescendants() const; | ||||
Amount GetModFeesWithDescendants() const { return nModFeesWithDescendants; } | |||||
int64_t GetSigChecksWithDescendants() const { | int64_t GetSigChecksWithDescendants() const { | ||||
return nSigChecksWithDescendants; | return nSigChecksWithDescendants; | ||||
} | } | ||||
bool GetSpendsCoinbase() const { return spendsCoinbase; } | bool GetSpendsCoinbase() const { return spendsCoinbase; } | ||||
uint64_t GetCountWithAncestors() const { return nCountWithAncestors; } | uint64_t GetCountWithAncestors() const { return nCountWithAncestors; } | ||||
uint64_t GetSizeWithAncestors() const { return nSizeWithAncestors; } | uint64_t GetSizeWithAncestors() const { return nSizeWithAncestors; } | ||||
uint64_t GetVirtualSizeWithAncestors() const; | uint64_t GetVirtualSizeWithAncestors() const; | ||||
Amount GetModFeesWithAncestors() const { return nModFeesWithAncestors; } | |||||
int64_t GetSigChecksWithAncestors() const { | int64_t GetSigChecksWithAncestors() const { | ||||
return nSigChecksWithAncestors; | return nSigChecksWithAncestors; | ||||
} | } | ||||
const Parents &GetMemPoolParentsConst() const { return m_parents; } | const Parents &GetMemPoolParentsConst() const { return m_parents; } | ||||
const Children &GetMemPoolChildrenConst() const { return m_children; } | const Children &GetMemPoolChildrenConst() const { return m_children; } | ||||
Parents &GetMemPoolParents() const { return m_parents; } | Parents &GetMemPoolParents() const { return m_parents; } | ||||
Children &GetMemPoolChildren() const { return m_children; } | Children &GetMemPoolChildren() const { return m_children; } | ||||
▲ Show 20 Lines • Show All 718 Lines • Show Last 20 Lines |