Skip to content

Commit 33b12e5

Browse files
committed
docs: improve docs where MemPoolLimits is used
1 parent 6945853 commit 33b12e5

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

src/txmempool.h

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,16 @@ class CTxMemPool
547547
/**
548548
* Helper function to calculate all in-mempool ancestors of staged_ancestors and apply ancestor
549549
* and descendant limits (including staged_ancestors thsemselves, entry_size and entry_count).
550-
* param@[in] entry_size Virtual size to include in the limits.
551-
* param@[in] entry_count How many entries to include in the limits.
552-
* param@[in] staged_ancestors Should contain entries in the mempool.
553-
* param@[out] setAncestors Will be populated with all mempool ancestors.
550+
*
551+
* @param[in] entry_size Virtual size to include in the limits.
552+
* @param[in] entry_count How many entries to include in the limits.
553+
* @param[out] setAncestors Will be populated with all mempool ancestors.
554+
* @param[in] staged_ancestors Should contain entries in the mempool.
555+
* @param[in] limits Maximum number and size of ancestors and descendants
556+
* @param[out] errString Populated with error reason if any limits are hit
557+
*
558+
* @return true if no limits were hit and all in-mempool ancestors were calculated, false
559+
* otherwise
554560
*/
555561
bool CalculateAncestorsAndCheckLimits(size_t entry_size,
556562
size_t entry_count,
@@ -665,12 +671,20 @@ class CTxMemPool
665671
*/
666672
void UpdateTransactionsFromBlock(const std::vector<uint256>& vHashesToUpdate) EXCLUSIVE_LOCKS_REQUIRED(cs, cs_main) LOCKS_EXCLUDED(m_epoch);
667673

668-
/** Try to calculate all in-mempool ancestors of entry.
669-
* (these are all calculated including the tx itself)
670-
* limits = maximum number and size of ancestors and descendants
671-
* errString = populated with error reason if any limits are hit
672-
* fSearchForParents = whether to search a tx's vin for in-mempool parents, or
673-
* look up parents from mapLinks. Must be true for entries not in the mempool
674+
/**
675+
* Try to calculate all in-mempool ancestors of entry.
676+
* (these are all calculated including the tx itself)
677+
*
678+
* @param[in] entry CTxMemPoolEntry of which all in-mempool ancestors are calculated
679+
* @param[out] setAncestors Will be populated with all mempool ancestors.
680+
* @param[in] limits Maximum number and size of ancestors and descendants
681+
* @param[out] errString Populated with error reason if any limits are hit
682+
* @param[in] fSearchForParents Whether to search a tx's vin for in-mempool parents, or look
683+
* up parents from mapLinks. Must be true for entries not in
684+
* the mempool
685+
*
686+
* @return true if no limits were hit and all in-mempool ancestors were calculated, false
687+
* otherwise
674688
*/
675689
bool CalculateMemPoolAncestors(const CTxMemPoolEntry& entry,
676690
setEntries& setAncestors,

0 commit comments

Comments
 (0)