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

mpp_split: stop returning splits without amounts

Public commit record

What the developer wrote

Authored by f321x

68/100 · Adequate
mpp_split: stop returning splits without amounts

`mpp_split.suggest_splits()` would return payment split
configurations with no split amounts like:
`{(channel_id, node_id): []}`.

This is unintuitive and introduced two bugs:

1. `LNWallet.create_routes_for_payment()` evaluates
`is_multichan_mpp = len(sc.config.items()) > 1`.
So even if the actual payment amount gets split onto
a single channel this would falsely evaluate `True`
if there is a empty split.

2. `is_direct_path = all(node_id == paysession.invoice_pubkey for (chan_id, node_id) in sc.config.keys())`
similarly might incorrectly evaluates `False` if the split
contains an empty split for another `node_id`.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in Electrum's Lightning payment splitting logic. Previously, the software could create payment plans that included empty 'splits' for channels that weren't actually being used. This caused two downstream checks to misclassify payments: a single-channel payment could be treated as a multi-channel payment, and a direct payment to the intended recipient could be treated as a routed payment. These misclassifications could lead to less efficient routing, higher fees, or routing failures rather than direct payment success.

Recommended action

Review the downstream effects in `LNWallet.create_routes_for_payment()` to confirm that removing empty splits fully resolves the misclassification issues. Consider whether any other consumers of `suggest_splits()` relied on the presence of empty entries. No immediate emergency action appears necessary, but users making Lightning payments should update to the fixed version.

Security signals we found

01

Logic bug in payment routing classification

02

Empty split entries cause incorrect multi-channel/direct-path detection

03

Could lead to suboptimal or failed Lightning payment routing

04

No explicit security disclosure in commit message

Risk score

Why this scored 48/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 7/15
Affected reach 10/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.