aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstickies-v <stickies-v@protonmail.com>2022-10-05 13:06:11 +0100
committerstickies-v <stickies-v@protonmail.com>2022-10-05 13:09:08 +0100
commit33b12e5df6aa14344dd084e0c6f2d34158fca383 (patch)
tree031d0286f0694f18777d18727f9f47b2e172cfca
parent6945853c0bf3b1941bfd18b5ffbd5a81be0e56da (diff)
downloadbitcoin-33b12e5df6aa14344dd084e0c6f2d34158fca383.tar.xz
docs: improve docs where MemPoolLimits is used
-rw-r--r--src/txmempool.h34
1 files changed, 24 insertions, 10 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index 8597b21417..760af78500 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -547,10 +547,16 @@ private:
/**
* Helper function to calculate all in-mempool ancestors of staged_ancestors and apply ancestor
* and descendant limits (including staged_ancestors thsemselves, entry_size and entry_count).
- * param@[in] entry_size Virtual size to include in the limits.
- * param@[in] entry_count How many entries to include in the limits.
- * param@[in] staged_ancestors Should contain entries in the mempool.
- * param@[out] setAncestors Will be populated with all mempool ancestors.
+ *
+ * @param[in] entry_size Virtual size to include in the limits.
+ * @param[in] entry_count How many entries to include in the limits.
+ * @param[out] setAncestors Will be populated with all mempool ancestors.
+ * @param[in] staged_ancestors Should contain entries in the mempool.
+ * @param[in] limits Maximum number and size of ancestors and descendants
+ * @param[out] errString Populated with error reason if any limits are hit
+ *
+ * @return true if no limits were hit and all in-mempool ancestors were calculated, false
+ * otherwise
*/
bool CalculateAncestorsAndCheckLimits(size_t entry_size,
size_t entry_count,
@@ -665,12 +671,20 @@ public:
*/
void UpdateTransactionsFromBlock(const std::vector<uint256>& vHashesToUpdate) EXCLUSIVE_LOCKS_REQUIRED(cs, cs_main) LOCKS_EXCLUDED(m_epoch);
- /** Try to calculate all in-mempool ancestors of entry.
- * (these are all calculated including the tx itself)
- * limits = maximum number and size of ancestors and descendants
- * errString = populated with error reason if any limits are hit
- * fSearchForParents = whether to search a tx's vin for in-mempool parents, or
- * look up parents from mapLinks. Must be true for entries not in the mempool
+ /**
+ * Try to calculate all in-mempool ancestors of entry.
+ * (these are all calculated including the tx itself)
+ *
+ * @param[in] entry CTxMemPoolEntry of which all in-mempool ancestors are calculated
+ * @param[out] setAncestors Will be populated with all mempool ancestors.
+ * @param[in] limits Maximum number and size of ancestors and descendants
+ * @param[out] errString Populated with error reason if any limits are hit
+ * @param[in] fSearchForParents Whether to search a tx's vin for in-mempool parents, or look
+ * up parents from mapLinks. Must be true for entries not in
+ * the mempool
+ *
+ * @return true if no limits were hit and all in-mempool ancestors were calculated, false
+ * otherwise
*/
bool CalculateMemPoolAncestors(const CTxMemPoolEntry& entry,
setEntries& setAncestors,