|
|
@ -73,12 +73,9 @@ private: |
|
|
|
CTransactionRef tx; |
|
|
|
CTransactionRef tx; |
|
|
|
CAmount nFee; //!< Cached to avoid expensive parent-transaction lookups
|
|
|
|
CAmount nFee; //!< Cached to avoid expensive parent-transaction lookups
|
|
|
|
size_t nTxWeight; //!< ... and avoid recomputing tx weight (also used for GetTxSize())
|
|
|
|
size_t nTxWeight; //!< ... and avoid recomputing tx weight (also used for GetTxSize())
|
|
|
|
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 entryPriority; //!< Priority when entering the mempool
|
|
|
|
|
|
|
|
unsigned int entryHeight; //!< Chain height when entering the mempool
|
|
|
|
unsigned int entryHeight; //!< Chain height when entering the mempool
|
|
|
|
CAmount inChainInputValue; //!< Sum of all txin values that are already in blockchain
|
|
|
|
|
|
|
|
bool spendsCoinbase; //!< keep track of transactions that spend a coinbase
|
|
|
|
bool spendsCoinbase; //!< keep track of transactions that spend a coinbase
|
|
|
|
int64_t sigOpCost; //!< Total sigop cost
|
|
|
|
int64_t sigOpCost; //!< Total sigop cost
|
|
|
|
int64_t feeDelta; //!< Used for determining the priority of the transaction for mining in a block
|
|
|
|
int64_t feeDelta; //!< Used for determining the priority of the transaction for mining in a block
|
|
|
@ -101,19 +98,14 @@ private: |
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
public: |
|
|
|
CTxMemPoolEntry(const CTransactionRef& _tx, const CAmount& _nFee, |
|
|
|
CTxMemPoolEntry(const CTransactionRef& _tx, const CAmount& _nFee, |
|
|
|
int64_t _nTime, double _entryPriority, unsigned int _entryHeight, |
|
|
|
int64_t _nTime, unsigned int _entryHeight, |
|
|
|
CAmount _inChainInputValue, bool spendsCoinbase, |
|
|
|
bool spendsCoinbase, |
|
|
|
int64_t nSigOpsCost, LockPoints lp); |
|
|
|
int64_t nSigOpsCost, LockPoints lp); |
|
|
|
|
|
|
|
|
|
|
|
CTxMemPoolEntry(const CTxMemPoolEntry& other); |
|
|
|
CTxMemPoolEntry(const CTxMemPoolEntry& other); |
|
|
|
|
|
|
|
|
|
|
|
const CTransaction& GetTx() const { return *this->tx; } |
|
|
|
const CTransaction& GetTx() const { return *this->tx; } |
|
|
|
CTransactionRef GetSharedTx() const { return this->tx; } |
|
|
|
CTransactionRef GetSharedTx() 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; |
|
|
|
|
|
|
|
const CAmount& GetFee() const { return nFee; } |
|
|
|
const CAmount& GetFee() const { return nFee; } |
|
|
|
size_t GetTxSize() const; |
|
|
|
size_t GetTxSize() const; |
|
|
|
size_t GetTxWeight() const { return nTxWeight; } |
|
|
|
size_t GetTxWeight() const { return nTxWeight; } |
|
|
|