Skip to content

Commit b6ee855

Browse files
committed
Merge #10380: [doc] Removing comments about dirty entries on txmempool
4f3782e [doc] Removing comments about dirty entries on txmempool (Simone Madeo) Tree-SHA512: 12ffad7237e2a8ec658cfcff263dad5a2220beadda48d67095df90c2f8ea55ffb6891d919698893b625965fb3069a05e7901fac6cceb3d1228e6833356408074
2 parents 8bd16ee + 4f3782e commit b6ee855

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

src/txmempool.h

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ class CTxMemPool;
6060
* (nCountWithDescendants, nSizeWithDescendants, and nModFeesWithDescendants) for
6161
* all ancestors of the newly added transaction.
6262
*
63-
* If updating the descendant state is skipped, we can mark the entry as
64-
* "dirty", and set nSizeWithDescendants/nModFeesWithDescendants to equal nTxSize/
65-
* nFee+feeDelta. (This can potentially happen during a reorg, where we limit the
66-
* amount of work we're willing to do to avoid consuming too much CPU.)
67-
*
6863
*/
6964

7065
class CTxMemPoolEntry
@@ -83,9 +78,7 @@ class CTxMemPoolEntry
8378

8479
// Information about descendants of this transaction that are in the
8580
// mempool; if we remove this transaction we must remove all of these
86-
// descendants as well. if nCountWithDescendants is 0, treat this entry as
87-
// dirty, and nSizeWithDescendants and nModFeesWithDescendants will not be
88-
// correct.
81+
// descendants as well.
8982
uint64_t nCountWithDescendants; //!< number of descendant transactions
9083
uint64_t nSizeWithDescendants; //!< ... and size
9184
CAmount nModFeesWithDescendants; //!< ... and total fees (all including us)
@@ -116,7 +109,7 @@ class CTxMemPoolEntry
116109
size_t DynamicMemoryUsage() const { return nUsageSize; }
117110
const LockPoints& GetLockPoints() const { return lockPoints; }
118111

119-
// Adjusts the descendant state, if this entry is not dirty.
112+
// Adjusts the descendant state.
120113
void UpdateDescendantState(int64_t modifySize, CAmount modifyFee, int64_t modifyCount);
121114
// Adjusts the ancestor state
122115
void UpdateAncestorState(int64_t modifySize, CAmount modifyFee, int64_t modifyCount, int modifySigOps);
@@ -399,14 +392,6 @@ enum class MemPoolRemovalReason {
399392
* CalculateMemPoolAncestors() takes configurable limits that are designed to
400393
* prevent these calculations from being too CPU intensive.
401394
*
402-
* Adding transactions from a disconnected block can be very time consuming,
403-
* because we don't have a way to limit the number of in-mempool descendants.
404-
* To bound CPU processing, we limit the amount of work we're willing to do
405-
* to properly update the descendant information for a tx being added from
406-
* a disconnected block. If we would exceed the limit, then we instead mark
407-
* the entry as "dirty", and set the feerate for sorting purposes to be equal
408-
* the feerate of the transaction without any descendants.
409-
*
410395
*/
411396
class CTxMemPool
412397
{

0 commit comments

Comments
 (0)