bip-0352: do not require the optional expected argument #2279

pull fametrano wants to merge 1 commits into bitcoin:master from fametrano:bip352-guard-optional-expected changing 1 files +14 −11
  1. fametrano commented at 6:50 PM on September 7, 2026: contributor

    create_outputs and scanning declare expected with a default of None but dereference expected.get(...) unconditionally, so calling either without it raises AttributeError, although the parameter is documented optional.

    Guard the expected-value checks with if expected is not None:. The self-test, which always passes expected, is unaffected; a standalone call with expected=None now returns its result instead of raising.

    If the harness coupling is intentional, I am happy to close this or turn it into a docs note instead.

  2. murchandamus added the label Proposed BIP modification on Sep 9, 2026
  3. murchandamus added the label Pending acceptance on Sep 9, 2026
  4. murchandamus commented at 3:24 PM on September 9, 2026: member

    cc: @theStack

  5. fametrano force-pushed on Sep 12, 2026
  6. bip-0352: do not require the optional expected argument
    create_outputs and scanning declare expected with a default of None but
    dereference it unconditionally (expected.get(...)), so calling either
    without it raises AttributeError, although the parameter is documented
    optional. Guard the expected-value checks with `if expected is not None:`.
    
    The self-test, which always passes expected, is unaffected.
    8754690b72
  7. fametrano force-pushed on Sep 19, 2026
  8. jonatack removed the label Proposed BIP modification on Sep 22, 2026
  9. jonatack removed the label Pending acceptance on Sep 22, 2026
  10. jonatack added the label Fixups on Sep 22, 2026
  11. jonatack commented at 5:04 AM on September 22, 2026: member

    ACK, tightly scoped robustness fix that makes reference.py more usable outside its own test harness.

  12. jonatack merged this on Sep 22, 2026
  13. jonatack closed this on Sep 22, 2026

  14. theStack commented at 3:27 PM on September 22, 2026: contributor

    post-merge ACK


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-09-29 05:10 UTC

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