mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge d1ae96755a into merged_master (Bitcoin PR bitcoin/bitcoin#27890)
This commit is contained in:
commit
f60b1bc9ee
3 changed files with 9 additions and 10 deletions
|
|
@ -58,7 +58,7 @@ struct CompareIteratorByHash {
|
|||
* ("descendant" transactions).
|
||||
*
|
||||
* When a new entry is added to the mempool, we update the descendant state
|
||||
* (nCountWithDescendants, nSizeWithDescendants, and nModFeesWithDescendants) for
|
||||
* (m_count_with_descendants, nSizeWithDescendants, and nModFeesWithDescendants) for
|
||||
* all ancestors of the newly added transaction.
|
||||
*
|
||||
*/
|
||||
|
|
@ -88,13 +88,13 @@ private:
|
|||
// 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.
|
||||
uint64_t nCountWithDescendants{1}; //!< number of descendant transactions
|
||||
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
|
||||
uint64_t nCountWithAncestors{1};
|
||||
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;
|
||||
|
|
@ -167,13 +167,13 @@ public:
|
|||
lockPoints = lp;
|
||||
}
|
||||
|
||||
uint64_t GetCountWithDescendants() const { return nCountWithDescendants; }
|
||||
uint64_t GetCountWithDescendants() const { return m_count_with_descendants; }
|
||||
int64_t GetSizeWithDescendants() const { return nSizeWithDescendants; }
|
||||
CAmount GetModFeesWithDescendants() const { return nModFeesWithDescendants; }
|
||||
|
||||
bool GetSpendsCoinbase() const { return spendsCoinbase; }
|
||||
|
||||
uint64_t GetCountWithAncestors() const { return nCountWithAncestors; }
|
||||
uint64_t GetCountWithAncestors() const { return m_count_with_ancestors; }
|
||||
int64_t GetSizeWithAncestors() const { return nSizeWithAncestors; }
|
||||
uint64_t GetDiscountSizeWithAncestors() const { return discountSizeWithAncestors; }
|
||||
CAmount GetModFeesWithAncestors() const { return nModFeesWithAncestors; }
|
||||
|
|
|
|||
|
|
@ -377,8 +377,8 @@ void CTxMemPoolEntry::UpdateDescendantState(int32_t modifySize, CAmount modifyFe
|
|||
nSizeWithDescendants += modifySize;
|
||||
assert(nSizeWithDescendants > 0);
|
||||
nModFeesWithDescendants = SaturatingAdd(nModFeesWithDescendants, modifyFee);
|
||||
nCountWithDescendants += uint64_t(modifyCount);
|
||||
assert(int64_t(nCountWithDescendants) > 0);
|
||||
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, int64_t discountSize)
|
||||
|
|
@ -386,8 +386,8 @@ void CTxMemPoolEntry::UpdateAncestorState(int32_t modifySize, CAmount modifyFee,
|
|||
nSizeWithAncestors += modifySize;
|
||||
assert(nSizeWithAncestors > 0);
|
||||
nModFeesWithAncestors = SaturatingAdd(nModFeesWithAncestors, modifyFee);
|
||||
nCountWithAncestors += uint64_t(modifyCount);
|
||||
assert(int64_t(nCountWithAncestors) > 0);
|
||||
m_count_with_ancestors += modifyCount;
|
||||
assert(m_count_with_ancestors > 0);
|
||||
nSigOpCostWithAncestors += modifySigOps;
|
||||
assert(int(nSigOpCostWithAncestors) >= 0);
|
||||
discountSizeWithAncestors += discountSize;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ unsigned-integer-overflow:hash.cpp
|
|||
unsigned-integer-overflow:policy/fees.cpp
|
||||
unsigned-integer-overflow:prevector.h
|
||||
unsigned-integer-overflow:script/interpreter.cpp
|
||||
unsigned-integer-overflow:txmempool.cpp
|
||||
unsigned-integer-overflow:xoroshiro128plusplus.h
|
||||
implicit-integer-sign-change:compat/stdin.cpp
|
||||
implicit-integer-sign-change:compressor.h
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue