policy: remove constant parameter from IsWellFormedPackage

`IsWellFormedPackage()` already claims: "parents must appear before children."
In practice the `require_sorted` argument was always passed as `true`, making the false-path dead code.
It was introduced that way from the beginning in https://github.com/bitcoin/bitcoin/pull/28758/files#diff-f30090b30c9489972ee3f1181c302cf3a484bb890bade0fd7c9ca92ea8d347f6R79.

Remove the unused parameter, updating callers/tests.
This commit is contained in:
Lőrinc
2025-12-28 19:29:18 +02:00
parent 2bcb3f6464
commit 658d38106a
4 changed files with 14 additions and 14 deletions

View File

@@ -1440,7 +1440,7 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptMultipleTransactionsInternal(con
// These context-free package limits can be done before taking the mempool lock.
PackageValidationState package_state;
if (!IsWellFormedPackage(txns, package_state, /*require_sorted=*/true)) return PackageMempoolAcceptResult(package_state, {});
if (!IsWellFormedPackage(txns, package_state)) return PackageMempoolAcceptResult(package_state, {});
std::vector<Workspace> workspaces{};
workspaces.reserve(txns.size());
@@ -1637,7 +1637,7 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptPackage(const Package& package,
// transactions and thus won't return any MempoolAcceptResults, just a package-wide error.
// Context-free package checks.
if (!IsWellFormedPackage(package, package_state_quit_early, /*require_sorted=*/true)) {
if (!IsWellFormedPackage(package, package_state_quit_early)) {
return PackageMempoolAcceptResult(package_state_quit_early, {});
}