aboutsummaryrefslogtreecommitdiff
path: root/src/test/util/txmempool.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/util/txmempool.h')
-rw-r--r--src/test/util/txmempool.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/util/txmempool.h b/src/test/util/txmempool.h
index a866d1ce74..b3022af7df 100644
--- a/src/test/util/txmempool.h
+++ b/src/test/util/txmempool.h
@@ -46,4 +46,14 @@ std::optional<std::string> CheckPackageMempoolAcceptResult(const Package& txns,
const PackageMempoolAcceptResult& result,
bool expect_valid,
const CTxMemPool* mempool);
+
+/** For every transaction in tx_pool, check v3 invariants:
+ * - a v3 tx's ancestor count must be within V3_ANCESTOR_LIMIT
+ * - a v3 tx's descendant count must be within V3_DESCENDANT_LIMIT
+ * - if a v3 tx has ancestors, its sigop-adjusted vsize must be within V3_CHILD_MAX_VSIZE
+ * - any non-v3 tx must only have non-v3 parents
+ * - any v3 tx must only have v3 parents
+ * */
+void CheckMempoolV3Invariants(const CTxMemPool& tx_pool);
+
#endif // BITCOIN_TEST_UTIL_TXMEMPOOL_H