From 04f65488ca3e8e8eb7d290982e55e70be96491bb Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Thu, 9 Oct 2025 20:34:36 -0400 Subject: [PATCH] Use cluster size limit instead of ancestor/descendant size limits when sanity checking TRUC policy limits --- src/policy/truc_policy.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/policy/truc_policy.h b/src/policy/truc_policy.h index 0ffd07511db..8b2ec097126 100644 --- a/src/policy/truc_policy.h +++ b/src/policy/truc_policy.h @@ -32,9 +32,8 @@ static constexpr int64_t TRUC_MAX_WEIGHT{TRUC_MAX_VSIZE * WITNESS_SCALE_FACTOR}; /** Maximum sigop-adjusted virtual size of a tx which spends from an unconfirmed TRUC transaction. */ static constexpr int64_t TRUC_CHILD_MAX_VSIZE{1000}; static constexpr int64_t TRUC_CHILD_MAX_WEIGHT{TRUC_CHILD_MAX_VSIZE * WITNESS_SCALE_FACTOR}; -// These limits are within the default ancestor/descendant limits. -static_assert(TRUC_MAX_VSIZE + TRUC_CHILD_MAX_VSIZE <= DEFAULT_ANCESTOR_SIZE_LIMIT_KVB * 1000); -static_assert(TRUC_MAX_VSIZE + TRUC_CHILD_MAX_VSIZE <= DEFAULT_DESCENDANT_SIZE_LIMIT_KVB * 1000); +// These limits are within the default cluster limits. +static_assert(TRUC_MAX_VSIZE + TRUC_CHILD_MAX_VSIZE <= DEFAULT_CLUSTER_SIZE_LIMIT_KVB * 1000); /** Must be called for every transaction, even if not TRUC. Not strictly necessary for transactions * accepted through AcceptMultipleTransactions.