AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 34 Bitcoin

qt confirm_tx_dialog: fix wallet.get_candidates_for_batching

Public commit record

What the developer wrote

Authored by SomberNight

81/100 · Strong
qt confirm_tx_dialog: fix wallet.get_candidates_for_batching

I don't understand what the "coins not used" comment meant here.
It was added in the change away from the old config.WALLET_BATCH_RBF option
(https://github.com/spesmilo/electrum/commit/ab14c3e1382c1af48baff73b790aecfbd069eb8a).

The `coins` param *is used* in wallet.get_candidates_for_batching.
Without setting that, the returned set of candidates was restricted to
only base txs that had a large enough change output to cover *all* the newly added outputs.
Instead, it is desirable to allow adding new inputs.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in Electrum's transaction batching feature. Previously, when suggesting which existing transactions could be combined (batched) with a new payment, the code ignored the wallet's available unspent coins. This made the batching suggestions too restrictive and could lead to suboptimal or unexpected transaction construction. The fix passes the available coins into the candidate-selection logic and documents the behavior. There is no direct evidence in the commit of a security vulnerability or exploit.

Recommended action

Review the batching logic for correctness and consider whether the conservative coin selection (`confirmed_only=True`) adequately mitigates race conditions with `make_tx()`. No immediate security patch appears required based solely on this diff.

Security signals we found

01

Functional bug in transaction batching candidate selection

02

Potential for unexpected transaction construction or fee/change behavior due to missing UTXO context

03

No explicit security claim, exploit primitive, or vulnerability disclosure present in commit

Risk score

Why this scored 34/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 4/15
Affected reach 6/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.