test: cover createmultisig nrequired bounds #36849

pull Pranav-error wants to merge 1 commits into bitcoin:master from Pranav-error:test-createmultisig-nrequired changing 1 files +12 −0
  1. Pranav-error commented at 8:37 PM on November 12, 2026: none

    The shared multisig-creation helper (src/rpc/util.cpp, used by createmultisig and addmultisigaddress) rejects an nrequired below 1 and above the number of supplied keys:

    • nrequired < 1 → "a multisignature address must require at least one key to redeem"
    • nrequired > keys → "not enough keys supplied (got N keys, but need at least M to redeem)"

    The sibling ">20 keys" limit is already covered in rpc_createmultisig.py, but neither of these two bounds was exercised by any functional test. This adds assertions for both.

    Ran test/functional/rpc_createmultisig.py locally — passes.

  2. test: cover createmultisig nrequired bounds
    The shared multisig-creation helper rejects an nrequired below 1
    ("a multisignature address must require at least one key to redeem")
    and above the number of supplied keys ("not enough keys supplied"),
    but neither error path was exercised by the functional tests.
    Add assertions for both to rpc_createmultisig.py.
    ec551a1f7a
  3. DrahtBot added the label Tests on Nov 12, 2026
  4. DrahtBot commented at 8:37 PM on November 12, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. Pranav-error closed this on Nov 13, 2026

  6. Pranav-error commented at 7:12 AM on November 13, 2026: none

    Closing this — I'll refile it in my own words.

Labels

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-11-14 18:51 UTC

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