policy/refactor: remove constant parameter from IsWellFormedPackage #34177

pull l0rinc wants to merge 1 commits into bitcoin:master from l0rinc:l0rinc/IsWellFormedPackage-require_sorted changing 4 files +14 −14
  1. l0rinc commented at 8:27 pm on December 29, 2025: contributor

    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.

  2. 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.
    658d38106a
  3. DrahtBot commented at 8:27 pm on December 29, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34177.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK billymcbip, instagibbs

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  4. l0rinc marked this as ready for review on Dec 30, 2025
  5. billymcbip commented at 1:56 pm on December 30, 2025: contributor

    tACK 658d38106a397ca04b94d98de57afc4de140feaa

    • The require_sorted argument is true in all call sites, making this a straightforward refactor.
    • The refactor aligns the implementation with the documentation comments.
  6. fanquake requested review from instagibbs on Dec 31, 2025
  7. fanquake requested review from glozow on Dec 31, 2025
  8. instagibbs approved
  9. instagibbs commented at 1:14 pm on December 31, 2025: member

    ACK 658d38106a397ca04b94d98de57afc4de140feaa

    I believe this functionality was intended to be used in a https://github.com/bitcoin/bips/blob/master/bip-0331.mediawiki like package relay scheme. Given that it has no test coverage and is unused, makes sense to remove. It can be reintroduced at any time with more advanced relay schemes.

  10. fanquake merged this on Jan 2, 2026
  11. fanquake closed this on Jan 2, 2026

  12. l0rinc deleted the branch on Jan 2, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-01-07 03:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me