|
|
@ -63,9 +63,10 @@ private: |
|
|
|
size_t nModSize; //! ... and modified size for priority
|
|
|
|
size_t nModSize; //! ... and modified size for priority
|
|
|
|
size_t nUsageSize; //! ... and total memory usage
|
|
|
|
size_t nUsageSize; //! ... and total memory usage
|
|
|
|
int64_t nTime; //! Local time when entering the mempool
|
|
|
|
int64_t nTime; //! Local time when entering the mempool
|
|
|
|
double dPriority; //! Priority when entering the mempool
|
|
|
|
double entryPriority; //! Priority when entering the mempool
|
|
|
|
unsigned int nHeight; //! Chain height when entering the mempool
|
|
|
|
unsigned int entryHeight; //! Chain height when entering the mempool
|
|
|
|
bool hadNoDependencies; //! Not dependent on any other txs when it entered the mempool
|
|
|
|
bool hadNoDependencies; //! Not dependent on any other txs when it entered the mempool
|
|
|
|
|
|
|
|
CAmount inChainInputValue; //! Sum of all txin values that are already in blockchain
|
|
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
@ -78,15 +79,20 @@ private: |
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
public: |
|
|
|
CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee, |
|
|
|
CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee, |
|
|
|
int64_t _nTime, double _dPriority, unsigned int _nHeight, bool poolHasNoInputsOf = false); |
|
|
|
int64_t _nTime, double _entryPriority, unsigned int _entryHeight, |
|
|
|
|
|
|
|
bool poolHasNoInputsOf, CAmount _inChainInputValue); |
|
|
|
CTxMemPoolEntry(const CTxMemPoolEntry& other); |
|
|
|
CTxMemPoolEntry(const CTxMemPoolEntry& other); |
|
|
|
|
|
|
|
|
|
|
|
const CTransaction& GetTx() const { return this->tx; } |
|
|
|
const CTransaction& GetTx() const { return this->tx; } |
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Fast calculation of lower bound of current priority as update |
|
|
|
|
|
|
|
* from entry priority. Only inputs that were originally in-chain will age. |
|
|
|
|
|
|
|
*/ |
|
|
|
double GetPriority(unsigned int currentHeight) const; |
|
|
|
double GetPriority(unsigned int currentHeight) const; |
|
|
|
const CAmount& GetFee() const { return nFee; } |
|
|
|
const CAmount& GetFee() const { return nFee; } |
|
|
|
size_t GetTxSize() const { return nTxSize; } |
|
|
|
size_t GetTxSize() const { return nTxSize; } |
|
|
|
int64_t GetTime() const { return nTime; } |
|
|
|
int64_t GetTime() const { return nTime; } |
|
|
|
unsigned int GetHeight() const { return nHeight; } |
|
|
|
unsigned int GetHeight() const { return entryHeight; } |
|
|
|
bool WasClearAtEntry() const { return hadNoDependencies; } |
|
|
|
bool WasClearAtEntry() const { return hadNoDependencies; } |
|
|
|
size_t DynamicMemoryUsage() const { return nUsageSize; } |
|
|
|
size_t DynamicMemoryUsage() const { return nUsageSize; } |
|
|
|
|
|
|
|
|
|
|
|