Files
bitcoin/src/wallet/test
Ava Chow 18c05d9301 Merge bitcoin/bitcoin#35590: test: wallet: BnB incomplete result on attempt-limit success
6ee05c4b18 test: wallet: BnB incomplete result on attempt-limit success (Bruno Garcia)

Pull request description:

  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
  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;
           }

  ```

ACKs for top commit:
  yashbhutwala:
    tACK 6ee05c4b18
  achow101:
    ACK 6ee05c4b18
  murchandamus:
    ACK 6ee05c4b18

Tree-SHA512: 32d0cc6da7586abdd195b87459da0a6ebbdcf8115bef41f5e625864bfa9ce8231a58f8d4b61708279ebeaef372e4f3b5fb18eab28a01dad53f043ba083330b3d
2026-07-17 18:18:18 -07:00
..
2026-07-14 13:48:33 +02:00