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. 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.
    8b8a0cbe82
Contributors

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-09 03:10 UTC

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