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

chancloser: add nil-tx guard to legacy close test

Public commit record

What the developer wrote

Authored by Jared Tobin

98/100 · Strong
chancloser: add nil-tx guard to legacy close test

Add call tracking to the legacy mockChannel so that every
MarkCoopBroadcasted invocation is recorded. TestTaprootFastClose
now asserts that at least one call was made and that every call
carried a non-nil tx, guarding against the limbo state described
in https://github.com/lightninglabs/taproot-assets/issues/2108.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit only changes a test file. It adds a safety check to make sure a function called during cooperative channel closes is always given a real transaction, not a blank one. The test now records every call and fails if any call has a nil transaction. It does not change the actual production code that users run, so it cannot by itself fix or introduce a live bug.

Recommended action

Treat this as a test-hardening commit. If the referenced limbo state is a real production concern, review the chancloser production code that calls MarkCoopBroadcasted to ensure it never passes a nil transaction, and consider adding a runtime guard or explicit error return there. No urgent deployment action is needed for this test-only change.

Security signals we found

01

Test-only regression guard for nil transaction in cooperative close path

02

References external issue about a 'limbo state' when ChanStatusCoopBroadcasted is set without a stored transaction

03

No production code change; no patch to the actual MarkCoopBroadcasted caller or channel state machine

Risk score

Why this scored 22/100

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