test: descriptor: bare multisig at TOP level with exactly 3 pubkeys is allowed #35540

pull brunoerg wants to merge 1 commits into bitcoin:master from brunoerg:2026-06-test-descriptor-bare-multisig changing 1 files +1 −0
  1. brunoerg commented at 12:48 PM on June 16, 2026: contributor

    When running mutation testing for src/script/descriptor.cpp, I noticed that the following mutant was not killed:

    diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp
    index 3b73a40cce..29775ba75f 100644
    --- a/src/script/descriptor.cpp
    +++ b/src/script/descriptor.cpp
    @@ -2393,7 +2393,7 @@ std::vector<std::unique_ptr<DescriptorImpl>> ParseScript(uint32_t& key_exp_index
                 return {};
             }
             if (ctx == ParseScriptContext::TOP) {
    -            if (providers.size() > 3) {
    +            if (providers.size() >= 3) {
                     error = strprintf("Cannot have %u pubkeys in bare multisig; only at most 3 pubkeys", providers.size());
                     return {};
                 }
    

    We current have a test case that verifies we cannot have 4 pubkeys in bare multisig, but we are not testing that exactly 3 pubkeys are allowed. This PR adds a test case for it.

  2. test: descriptor: bare multisig at TOP level with 3 pubkeys is allowed 55a4c946f6
  3. DrahtBot added the label Tests on Jun 16, 2026
  4. DrahtBot commented at 12:48 PM on June 16, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK darosior, sedited

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. darosior approved
  6. darosior commented at 8:20 PM on June 16, 2026: member

    utACK 55a4c946f6749cf2f57fb70d98eeaec9900c32e9

  7. sedited approved
  8. sedited commented at 11:58 AM on June 17, 2026: contributor

    ACK 55a4c946f6749cf2f57fb70d98eeaec9900c32e9

  9. sedited merged this on Jun 17, 2026
  10. sedited closed this on Jun 17, 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-06-20 23:51 UTC

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