diff options
Diffstat (limited to 'src/test/util/txmempool.cpp')
-rw-r--r-- | src/test/util/txmempool.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/test/util/txmempool.cpp b/src/test/util/txmempool.cpp index 94d50bba50..9d6b4810d0 100644 --- a/src/test/util/txmempool.cpp +++ b/src/test/util/txmempool.cpp @@ -8,7 +8,7 @@ #include <node/context.h> #include <node/mempool_args.h> #include <policy/rbf.h> -#include <policy/v3_policy.h> +#include <policy/truc_policy.h> #include <txmempool.h> #include <util/check.h> #include <util/time.h> @@ -141,30 +141,30 @@ std::optional<std::string> CheckPackageMempoolAcceptResult(const Package& txns, return std::nullopt; } -void CheckMempoolV3Invariants(const CTxMemPool& tx_pool) +void CheckMempoolTRUCInvariants(const CTxMemPool& tx_pool) { LOCK(tx_pool.cs); for (const auto& tx_info : tx_pool.infoAll()) { const auto& entry = *Assert(tx_pool.GetEntry(tx_info.tx->GetHash())); if (tx_info.tx->version == TRUC_VERSION) { // Check that special maximum virtual size is respected - Assert(entry.GetTxSize() <= V3_MAX_VSIZE); + Assert(entry.GetTxSize() <= TRUC_MAX_VSIZE); - // Check that special v3 ancestor/descendant limits and rules are always respected - Assert(entry.GetCountWithDescendants() <= V3_DESCENDANT_LIMIT); - Assert(entry.GetCountWithAncestors() <= V3_ANCESTOR_LIMIT); - Assert(entry.GetSizeWithDescendants() <= V3_MAX_VSIZE + V3_CHILD_MAX_VSIZE); - Assert(entry.GetSizeWithAncestors() <= V3_MAX_VSIZE + V3_CHILD_MAX_VSIZE); + // Check that special TRUC ancestor/descendant limits and rules are always respected + Assert(entry.GetCountWithDescendants() <= TRUC_DESCENDANT_LIMIT); + Assert(entry.GetCountWithAncestors() <= TRUC_ANCESTOR_LIMIT); + Assert(entry.GetSizeWithDescendants() <= TRUC_MAX_VSIZE + TRUC_CHILD_MAX_VSIZE); + Assert(entry.GetSizeWithAncestors() <= TRUC_MAX_VSIZE + TRUC_CHILD_MAX_VSIZE); // If this transaction has at least 1 ancestor, it's a "child" and has restricted weight. if (entry.GetCountWithAncestors() > 1) { - Assert(entry.GetTxSize() <= V3_CHILD_MAX_VSIZE); - // All v3 transactions must only have v3 unconfirmed parents. + Assert(entry.GetTxSize() <= TRUC_CHILD_MAX_VSIZE); + // All TRUC transactions must only have TRUC unconfirmed parents. const auto& parents = entry.GetMemPoolParentsConst(); Assert(parents.begin()->get().GetSharedTx()->version == TRUC_VERSION); } } else if (entry.GetCountWithAncestors() > 1) { - // All non-v3 transactions must only have non-v3 unconfirmed parents. + // All non-TRUC transactions must only have non-TRUC unconfirmed parents. for (const auto& parent : entry.GetMemPoolParentsConst()) { Assert(parent.get().GetSharedTx()->version != TRUC_VERSION); } |