Use cluster size limit instead of ancestor size limit in txpackage unit test
What changed, and why it matters
This is a one-line change inside a Bitcoin Core unit test file. It updates a test assertion to use the newer 'cluster size limit' constant instead of the older 'ancestor size limit' constant when checking that a deliberately oversized placeholder transaction is recognized as too large. The change only affects test code and does not alter any production behavior, network rules, or security logic.
No security action required. This is a routine test-maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In src/test/txpackage_tests.cpp, the assertion verifying that a placeholder transaction exceeds the policy size limit was updated from DEFAULT_ANCESTOR_SIZE_LIMIT_KVB to DEFAULT_CLUSTER_SIZE_LIMIT_KVB. This aligns the unit test with the current mempool policy naming/semantics. The production mempool policy itself is not changed by this commit.
Changed components
src/test/txpackage_tests.cppInspect captured patch +1 / −1
diff --git a/src/test/txpackage_tests.cpp b/src/test/txpackage_tests.cpp
index ded13c4c..d82bd93c 100644
--- a/src/test/txpackage_tests.cpp
+++ b/src/test/txpackage_tests.cpp
@@ -239,7 +239,7 @@ BOOST_AUTO_TEST_CASE(package_validation_tests)
}
// A single, giant transaction submitted through ProcessNewPackage fails on single tx policy.
CTransactionRef giant_ptx = create_placeholder_tx(999, 999);
- BOOST_CHECK(GetVirtualTransactionSize(*giant_ptx) > DEFAULT_ANCESTOR_SIZE_LIMIT_KVB * 1000);
+ BOOST_CHECK(GetVirtualTransactionSize(*giant_ptx) > DEFAULT_CLUSTER_SIZE_LIMIT_KVB * 1000);
Package package_single_giant{giant_ptx};
auto result_single_large = ProcessNewPackage(m_node.chainman->ActiveChainstate(), *m_node.mempool, package_single_giant, /*test_accept=*/true, /*client_maxfeerate=*/{});
if (auto err_single_large{CheckPackageMempoolAcceptResult(package_single_giant, result_single_large, /*expect_valid=*/false, nullptr)}) {
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.