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

wallet: make_unsigned_tx: fix base_tx for GUI simple-send batching

Public commit record

What the developer wrote

Authored by SomberNight

91/100 · Strong
wallet: make_unsigned_tx: fix base_tx for GUI simple-send batching

fixes regression from https://github.com/spesmilo/electrum/commit/a9f20e4d3de9848247a9079b5b164d8006cf80db :
For the GUI / manual new tx constructions usecase, the flow relies on `base_tx.add_info_from_wallet(self)` being called before `base_tx_fee = base_tx.get_fee()`.

fixes https://github.com/spesmilo/electrum/issues/10587
maybe fixes https://github.com/spesmilo/electrum/issues/8876
probably not a full fix: base_tx could have inputs for which add_info_from_wallet is not sufficient
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in Electrum's Bitcoin wallet where combining a new payment with an existing unconfirmed transaction (a feature called RBF batching) could fail or compute fees incorrectly. The root cause was that the code tried to read the existing transaction's fee before it had loaded all the necessary wallet information about that transaction's inputs. The fix reorders the code so the wallet enriches the transaction first, then reads its fee. It also adds a safety check to skip transactions whose confirmation status is unknown when looking for batching candidates.

Recommended action

Review the fee-estimation path for other places where `get_fee()` may be called before `add_info_from_wallet()`. Consider whether `base_tx_fee = None` for non-ismine inputs needs explicit handling, as noted by the added FIXME. Users relying on RBF batching in the Qt GUI should upgrade.

Security signals we found

01

Incorrect fee estimation when batching with an unconfirmed base transaction

02

Use of transaction data before wallet enrichment (add_info_from_wallet)

03

Potential crash or misbehavior in GUI simple-send RBF batching

04

Missing handling of unknown confirmation status in batching candidate selection

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.