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

itest: cover on-chain interceptor settlement

Public commit record

What the developer wrote

Authored by ziggie

78/100 · Adequate
itest: cover on-chain interceptor settlement

Add coverage for held forwards that move on chain after the
incoming channel force closes.

The restart case exercises the path where Bob loses the in-memory
held set and contractcourt re-offers the HTLC through the witness
beacon. The no-restart case keeps the original off-chain hold and
proves that settlement must still reach the on-chain resolver.
✓ 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 adds new integration tests for the Lightning Network Daemon (LND). The tests check what happens when a payment is deliberately held by an external interceptor and the underlying channel is force-closed on-chain. The commit message and comments describe two related bug paths: after a restart, an on-chain held HTLC could be accidentally dropped when a new block is mined because it lacked an auto-fail height; and without a restart, an old off-chain held entry could block settlement from reaching the on-chain resolver. The commit itself only adds tests, not fixes, so it documents and reproduces the issue rather than changing production code.

Recommended action

Treat this commit as a regression-test addition for a bug that should be verified as already fixed in prior or accompanying production commits. Review the actual fix in the interceptor/registry and contractcourt resolver code to ensure (1) on-chain intercepted HTLCs carry a correct auto-fail height or are not evicted by block height checks, and (2) duplicate off-chain/on-chain held entries are de-duplicated so settlement reaches the on-chain resolver. Run the new integration tests against the current production code to confirm they pass.

Security signals we found

01

On-chain HTLC settlement failure after force-close and restart

02

Held HTLC entry eviction due to missing auto-fail height for on-chain packets

03

Duplicate held-entry path may block on-chain contest resolver settlement

04

Payment could remain unresolved or funds could be locked if sweep is not registered

05

Test-only commit; production fix not visible in this patch

Risk score

Why this scored 57/100

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