Skip to content

[pull] master from bitcoin:master - #1874

Merged
pull[bot] merged 3 commits into
All-Blockchains:masterfrom
bitcoin:master
Sep 25, 2026
Merged

pull[bot] merged 3 commits into
All-Blockchains:masterfrom
bitcoin:master

Conversation

@pull

@pull pull Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

fjahr and others added 3 commits September 17, 2026 00:48
…rtialspends

7193249 test: Check that ineligible output groups are discarded only once (Fabian Jahr)
20307f0 wallet: don't double count discarded output groups with avoidpartialspends (Fabian Jahr)

Pull request description:

  With `-avoidpartialspends` or `avoid_reuse`, `GroupOutputs` puts every positive-value output into both the mixed and the positive-only map and runs `push_output_groups` on each, so a group rejected by the eligibility filters lands in `discarded_groups` twice. `AutomaticCoinSelection` then subtracts it twice and could fail with an insufficient funds error even when there would be enough confirmed coins to cover the payment.

  Not a problem in a default wallet but it can happen with `sendtoaddress` from an `avoid_reuse` wallet, or with `-avoidpartialspends=1`.

  The simplest possible fix is to record discards only from the mixed map pass, which contains every output anyway. Also adds a test that reproduces the issue.

ACKs for top commit:
  achow101:
    ACK 7193249
  pablomartin4btc:
    ACK 7193249
  vicjuma:
    ACK 7193249
  polespinasa:
    code reviewed ACK 7193249

Tree-SHA512: 3028f8feeacecc601aacfce757fc885b7bd25cf6ea2ad9d9b65c56b5da71096aa48d0d70ce04d80fc2b147d67109c47d190e5dc925d06c67dfcf33cf8cc715d8
@pull pull Bot locked and limited conversation to collaborators Sep 25, 2026
@pull pull Bot added the ⤵️ pull label Sep 25, 2026
@pull
pull Bot merged commit e8e7e91 into All-Blockchains:master Sep 25, 2026
0 of 25 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants