test: wallet: BnB incomplete result on attempt-limit success #35590

pull brunoerg wants to merge 1 commits into bitcoin:master from brunoerg:2026-06-test-bnb changing 1 files +25 −0
  1. brunoerg commented at 12:14 PM on June 23, 2026: contributor

    BnB can return a valid selection before exhausting the search tree, then hit TOTAL_TRIES while continuing to look for a better one. Add a unit test for that path using a known exhaustion fixture plus an exact-match coin, and assert the result is marked incomplete via GetAlgoCompleted() == false.

    It kills the following mutant:

    diff --git a/src/wallet/coinselection.cpp b/src/wallet/coinselection.cpp
    index 8d69957c30..e4d07415f3 100644
    --- a/src/wallet/coinselection.cpp
    +++ b/src/wallet/coinselection.cpp
    @@ -212,7 +212,7 @@ util::Result<SelectionResult> SelectCoinsBnB(std::vector<OutputGroup>& utxo_pool
     
             if (curr_try >= TOTAL_TRIES) {
                 // Solution is not guaranteed to be optimal if `curr_try` hit TOTAL_TRIES
    -            result.SetAlgoCompleted(false);
    +            result.SetAlgoCompleted(true);
                 break;
             }
     
    
  2. test: wallet: BnB incomplete result on attempt-limit success
    BnB can return a valid selection before exhausting
    the search tree, then hit TOTAL_TRIES while continuing
    to look for a better one. Add a unit test for that path
    using a known exhaustion fixture plus an exact-match
    coin, and assert the result is marked incomplete via
    GetAlgoCompleted() == false.
    8132644275
  3. DrahtBot added the label Tests on Jun 23, 2026
  4. DrahtBot commented at 12:14 PM on June 23, 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/35590.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. brunoerg commented at 6:11 PM on June 30, 2026: contributor
Contributors
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-07-02 02:51 UTC

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