mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
Use CAmount for fee delta and modified fee
This commit is contained in:
parent
fa8857c3f7
commit
fa84a49526
3 changed files with 6 additions and 6 deletions
|
@ -45,7 +45,7 @@ struct CTxMemPoolModifiedEntry {
|
|||
nSigOpCostWithAncestors = entry->GetSigOpCostWithAncestors();
|
||||
}
|
||||
|
||||
int64_t GetModifiedFee() const { return iter->GetModifiedFee(); }
|
||||
CAmount GetModifiedFee() const { return iter->GetModifiedFee(); }
|
||||
uint64_t GetSizeWithAncestors() const { return nSizeWithAncestors; }
|
||||
CAmount GetModFeesWithAncestors() const { return nModFeesWithAncestors; }
|
||||
size_t GetTxSize() const { return iter->GetTxSize(); }
|
||||
|
|
|
@ -89,7 +89,7 @@ CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef& tx, CAmount fee,
|
|||
nModFeesWithAncestors{nFee},
|
||||
nSigOpCostWithAncestors{sigOpCost} {}
|
||||
|
||||
void CTxMemPoolEntry::UpdateFeeDelta(int64_t newFeeDelta)
|
||||
void CTxMemPoolEntry::UpdateFeeDelta(CAmount newFeeDelta)
|
||||
{
|
||||
nModFeesWithDescendants += newFeeDelta - feeDelta;
|
||||
nModFeesWithAncestors += newFeeDelta - feeDelta;
|
||||
|
|
|
@ -101,7 +101,7 @@ private:
|
|||
const unsigned int entryHeight; //!< Chain height when entering the mempool
|
||||
const bool spendsCoinbase; //!< keep track of transactions that spend a coinbase
|
||||
const int64_t sigOpCost; //!< Total sigop cost
|
||||
int64_t feeDelta{0}; //!< Used for determining the priority of the transaction for mining in a block
|
||||
CAmount feeDelta{0}; //!< Used for determining the priority of the transaction for mining in a block
|
||||
LockPoints lockPoints; //!< Track the height and time at which tx was final
|
||||
|
||||
// Information about descendants of this transaction that are in the
|
||||
|
@ -131,7 +131,7 @@ public:
|
|||
std::chrono::seconds GetTime() const { return std::chrono::seconds{nTime}; }
|
||||
unsigned int GetHeight() const { return entryHeight; }
|
||||
int64_t GetSigOpCost() const { return sigOpCost; }
|
||||
int64_t GetModifiedFee() const { return nFee + feeDelta; }
|
||||
CAmount GetModifiedFee() const { return nFee + feeDelta; }
|
||||
size_t DynamicMemoryUsage() const { return nUsageSize; }
|
||||
const LockPoints& GetLockPoints() const { return lockPoints; }
|
||||
|
||||
|
@ -140,8 +140,8 @@ public:
|
|||
// Adjusts the ancestor state
|
||||
void UpdateAncestorState(int64_t modifySize, CAmount modifyFee, int64_t modifyCount, int64_t modifySigOps);
|
||||
// Updates the fee delta used for mining priority score, and the
|
||||
// modified fees with descendants.
|
||||
void UpdateFeeDelta(int64_t feeDelta);
|
||||
// modified fees with descendants/ancestors.
|
||||
void UpdateFeeDelta(CAmount newFeeDelta);
|
||||
// Update the LockPoints after a reorg
|
||||
void UpdateLockPoints(const LockPoints& lp);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue