Remove unused members from CTxMemPoolEntry
This commit is contained in:
1 parent
ff3b398d12
commit
fc4e3e6bc1
2 files changed
+1
-35
No files matched your search
@@ -88,21 +88,6 @@ private:
|
|||||||
CAmount m_modified_fee; //!< Used for determining the priority of the transaction for mining in a block
|
CAmount m_modified_fee; //!< Used for determining the priority of the transaction for mining in a block
|
||||||
mutable LockPoints lockPoints; //!< Track the height and time at which tx was final
|
mutable LockPoints lockPoints; //!< Track the height and time at which tx was final
|
||||||
|
|
||||||
// Information about descendants of this transaction that are in the
|
|
||||||
// mempool; if we remove this transaction we must remove all of these
|
|
||||||
// descendants as well.
|
|
||||||
int64_t m_count_with_descendants{1}; //!< number of descendant transactions
|
|
||||||
// Using int64_t instead of int32_t to avoid signed integer overflow issues.
|
|
||||||
int64_t nSizeWithDescendants; //!< ... and size
|
|
||||||
CAmount nModFeesWithDescendants; //!< ... and total fees (all including us)
|
|
||||||
|
|
||||||
// Analogous statistics for ancestor transactions
|
|
||||||
int64_t m_count_with_ancestors{1};
|
|
||||||
// Using int64_t instead of int32_t to avoid signed integer overflow issues.
|
|
||||||
int64_t nSizeWithAncestors;
|
|
||||||
CAmount nModFeesWithAncestors;
|
|
||||||
int64_t nSigOpCostWithAncestors;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~CTxMemPoolEntry() = default;
|
virtual ~CTxMemPoolEntry() = default;
|
||||||
CTxMemPoolEntry(TxGraph::Ref&& ref, const CTransactionRef& tx, CAmount fee,
|
CTxMemPoolEntry(TxGraph::Ref&& ref, const CTransactionRef& tx, CAmount fee,
|
||||||
@@ -120,12 +105,7 @@ public:
|
|||||||
spendsCoinbase{spends_coinbase},
|
spendsCoinbase{spends_coinbase},
|
||||||
sigOpCost{sigops_cost},
|
sigOpCost{sigops_cost},
|
||||||
m_modified_fee{nFee},
|
m_modified_fee{nFee},
|
||||||
lockPoints{lp},
|
lockPoints{lp} {}
|
||||||
nSizeWithDescendants{GetTxSize()},
|
|
||||||
nModFeesWithDescendants{nFee},
|
|
||||||
nSizeWithAncestors{GetTxSize()},
|
|
||||||
nModFeesWithAncestors{nFee},
|
|
||||||
nSigOpCostWithAncestors{sigOpCost} {}
|
|
||||||
|
|
||||||
CTxMemPoolEntry& operator=(const CTxMemPoolEntry&) = delete;
|
CTxMemPoolEntry& operator=(const CTxMemPoolEntry&) = delete;
|
||||||
CTxMemPoolEntry(CTxMemPoolEntry&&) = default;
|
CTxMemPoolEntry(CTxMemPoolEntry&&) = default;
|
||||||
@@ -155,8 +135,6 @@ public:
|
|||||||
// Updates the modified fees with descendants/ancestors.
|
// Updates the modified fees with descendants/ancestors.
|
||||||
void UpdateModifiedFee(CAmount fee_diff)
|
void UpdateModifiedFee(CAmount fee_diff)
|
||||||
{
|
{
|
||||||
nModFeesWithDescendants = SaturatingAdd(nModFeesWithDescendants, fee_diff);
|
|
||||||
nModFeesWithAncestors = SaturatingAdd(nModFeesWithAncestors, fee_diff);
|
|
||||||
m_modified_fee = SaturatingAdd(m_modified_fee, fee_diff);
|
m_modified_fee = SaturatingAdd(m_modified_fee, fee_diff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -361,22 +361,10 @@ void CTxMemPool::UpdateForRemoveFromMempool(const setEntries &entriesToRemove, b
|
|||||||
|
|
||||||
void CTxMemPoolEntry::UpdateDescendantState(int32_t modifySize, CAmount modifyFee, int64_t modifyCount)
|
void CTxMemPoolEntry::UpdateDescendantState(int32_t modifySize, CAmount modifyFee, int64_t modifyCount)
|
||||||
{
|
{
|
||||||
nSizeWithDescendants += modifySize;
|
|
||||||
assert(nSizeWithDescendants > 0);
|
|
||||||
nModFeesWithDescendants = SaturatingAdd(nModFeesWithDescendants, modifyFee);
|
|
||||||
m_count_with_descendants += modifyCount;
|
|
||||||
assert(m_count_with_descendants > 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTxMemPoolEntry::UpdateAncestorState(int32_t modifySize, CAmount modifyFee, int64_t modifyCount, int64_t modifySigOps)
|
void CTxMemPoolEntry::UpdateAncestorState(int32_t modifySize, CAmount modifyFee, int64_t modifyCount, int64_t modifySigOps)
|
||||||
{
|
{
|
||||||
nSizeWithAncestors += modifySize;
|
|
||||||
assert(nSizeWithAncestors > 0);
|
|
||||||
nModFeesWithAncestors = SaturatingAdd(nModFeesWithAncestors, modifyFee);
|
|
||||||
m_count_with_ancestors += modifyCount;
|
|
||||||
assert(m_count_with_ancestors > 0);
|
|
||||||
nSigOpCostWithAncestors += modifySigOps;
|
|
||||||
assert(int(nSigOpCostWithAncestors) >= 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Clamp option values and populate the error if options are not valid.
|
//! Clamp option values and populate the error if options are not valid.
|
||||||
|
|||||||
Reference in new issue
Block a user