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

xpay: add helper for payment deliver

Public commit record

What the developer wrote

Authored by Lagrang3

68/100 · Adequate
xpay: add helper for payment deliver

Don't assume that payment->amount means the desired delivery amount.
Use a helper instead when we need that.

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit refactors how the xpay plugin tracks the intended delivery amount for a Lightning payment. Previously, the code assumed payment->amount always meant the amount the recipient should receive. The change introduces helper functions so the code can distinguish between the total desired delivery amount and the amount currently tied up in active routing attempts. This is a defensive cleanup that may prevent bugs where fees or partial payments are mis-accounted, but the commit itself does not describe a specific vulnerability or exploit.

Recommended action

Treat as a hardening/refactor commit. Review the semantic change in waitblockheight_done() to confirm that switching from total_being_delivered() to payment_current_amount() does not introduce a regression in amount accounting. No immediate security patch or incident response is indicated by the commit itself.

Security signals we found

01

Refactor of payment amount semantics in routing/fee logic

02

Change from total_being_delivered() to payment_current_amount() in waitblockheight_done()

03

Introduction of helper to centralize 'desired delivery amount' interpretation

04

No changelog entry and no explicit security framing by author

Risk score

Why this scored 31/100

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