mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
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:
@@ -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, {});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user