aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index ae4b16d377..76ca83c25c 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -585,6 +585,22 @@ private:
*/
std::set<uint256> m_unbroadcast_txids GUARDED_BY(cs);
+
+ /**
+ * Helper function to populate setAncestors with all the ancestors of entry and apply ancestor
+ * and descendant limits.
+ * param@[out] setAncestors Will be populated with all mempool ancestors of entry.
+ * param@[in] staged_ancestors Should contain mempool parents of entry.
+ */
+ bool CalculateAncestorsAndCheckLimits(const CTxMemPoolEntry& entry,
+ setEntries& setAncestors,
+ CTxMemPoolEntry::Parents &staged_ancestors,
+ uint64_t limitAncestorCount,
+ uint64_t limitAncestorSize,
+ uint64_t limitDescendantCount,
+ uint64_t limitDescendantSize,
+ std::string &errString) const EXCLUSIVE_LOCKS_REQUIRED(cs);
+
public:
indirectmap<COutPoint, const CTransaction*> mapNextTx GUARDED_BY(cs);
std::map<uint256, CAmount> mapDeltas GUARDED_BY(cs);