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

lnworker/lnrouter: update liquidity hints in htlc callbacks

Public commit record

What the developer wrote

Authored by f321x

73/100 · Adequate
lnworker/lnrouter: update liquidity hints in htlc callbacks

Update the channel liquidity hints in the
`htlc_fulfilled`/`htlc_failed` callbacks instead of the htlc
log handler (`_process_htlc_log()`).
`_process_htlc_log()` would raise `PaymentSuccess()` on the first fulfilled
htlc, removing the inflight htlcs counted in `LiquidityHintMgr` only for this
htlc's route.
All other htlcs that arrive later would leak and not get removed anywhere,
so the inflight htlc counter didn't get decreased and successful routes
would be punished by the penalty.
✓ Specific, 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 routing. Previously, when a multi-part payment succeeded, only the first successful payment chunk properly updated the wallet's internal channel-liquidity bookkeeping. Later chunks were never cleaned up, so the wallet kept treating those routes as if they still had money in flight. Over time this could make the wallet wrongly avoid or penalize channels that had actually worked fine, degrading payment reliability. The fix moves the cleanup into the proper success/failure callbacks so every chunk is accounted for.

Recommended action

Apply the patch. Users relying on Lightning multi-part payments should upgrade to avoid degraded routing decisions. No immediate remote exploit is evident, but payment reliability and fee costs may be affected until patched.

Security signals we found

01

Resource/accounting leak in routing state

02

Incorrect penalty of successful Lightning routes

03

Potential denial-of-service against local payment reliability

04

Logic bug in multi-part payment cleanup

Risk score

Why this scored 34/100

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