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

Set PaymentSent::fee_paid_msat in abandoned case

Public commit record

What the developer wrote

Authored by Valentine Wallace

68/100 · Adequate
Set PaymentSent::fee_paid_msat in abandoned case

If an outbound payment was abandoned with htlcs in-flight and later claimed, we
would previously have the PaymentSent::fee_paid_msat be set to None. This
contradicted some docs on the event that stated the field would always be Some
after 0.0.103.
✓ 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 small bookkeeping bug in the Lightning Dev Kit. When a user abandoned an in-flight payment but the payment still succeeded later, the reported fee field was incorrectly left blank (None), even though the documentation promised it would always be filled in for newer versions. The patch preserves the fee amount when a payment is abandoned so it can still be reported correctly if an HTLC later succeeds. There is no direct security vulnerability here—no funds are stolen, lost, or incorrectly routed—but it removes a contradiction between documented behavior and actual behavior that downstream software might rely on.

Recommended action

No immediate security action required. Treat as a normal bugfix release. Downstream consumers that parse PaymentSent events can remove workarounds for the None fee case after upgrading to the fixed versions (0.3, 0.2.3, 0.1.10).

Security signals we found

01

Incorrect/incomplete API contract between documented behavior and returned event data

02

Potential for downstream accounting or fee-reporting logic to misbehave if it assumes fee_paid_msat is always Some for modern versions

03

Regression test added for the fixed behavior

Risk score

Why this scored 23/100

Our methodology →
Potential impact 4/30
Exploitability 0/25
Stealth signal 2/15
Affected reach 3/15
Confidence 9/10
Evidence quality 5/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.