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

Fail held HTLCs on LSPS2 abandon

Public commit record

What the developer wrote

Authored by Joost Jager

78/100 · Adequate
Fail held HTLCs on LSPS2 abandon

Drain queued intercepted HTLCs before removing pending LSPS2
JIT channel state in channel_open_abandoned. Add a real
interception regression test that verifies the held HTLC is no
longer pending after the abandon call.
✓ 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 the Lightning Dev Kit's LSPS2 (Just-In-Time channel) service. Previously, when a service provider abandoned a pending JIT channel open, any intercepted HTLCs (pending payment holds) waiting for that channel were left stuck in limbo instead of being properly failed backwards. The patch now drains the queued HTLCs and fails them before removing the channel state, preventing funds from being locked up and ensuring the payment sender receives a failure notification.

Recommended action

Review and merge the patch, then ensure any deployments running LSPS2 JIT channels update to include this fix to avoid stuck HTLCs on abandoned channel opens.

Security signals we found

01

HTLCs held in payment_queue could remain pending indefinitely after channel_open_abandoned, potentially locking sender funds

02

Missing cleanup of intercepted HTLC state on JIT channel abandonment

03

Regression test confirms fail_intercepted_htlc is invoked and HTLC is released

Risk score

Why this scored 60/100

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