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

LNWallet: fix fee budget check regression

Public commit record

What the developer wrote

Authored by f321x

78/100 · Adequate
LNWallet: fix fee budget check regression

The fee budget during local pathfinding route creation incorrectly
compared the full payment amount against the full budget on every
route instead of the partial amount against its fraction of the budget.
This is a regression introduced by df5c8c4c9 and makes it possible
for a payment to exceed the budget or a route to be incorrectly considered
too expensive.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a bug in Electrum's Lightning Network payment routing. When splitting a payment into multiple parts, the app was checking each partial route's fees against the entire payment's fee budget instead of that part's fair share. This could cause a payment to silently overspend on fees, or wrongly reject a valid route as too expensive. The fix makes each partial route responsible only for its proportional share of the fee budget.

Recommended action

Users relying on Lightning payments should upgrade to a version containing this commit. Review related multi-part payment tests and consider adding regression tests for fee-budget checks with number_parts > 1.

Security signals we found

01

Fee-budget logic regression in payment routing

02

Multi-part Lightning payment fee overpayment possible

03

Incorrect comparison of full amount/budget against partial route

04

Potential payment failure or excessive fee acceptance

Risk score

Why this scored 63/100

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