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

channeld: simplify pending_updates() using HTLC_F_WILL_SEND

Public commit record

What the developer wrote

Authored by Rusty Russell

65/100 · Adequate
channeld: simplify pending_updates() using HTLC_F_WILL_SEND

And remove `uncommitted_ok` flag which was always false.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit simplifies how Core Lightning decides whether a channel still has unfinished updates before entering a quiet 'STFU' mode. It removes an 'uncommitted_ok' option that was never actually used as true, and replaces a hand-rolled check with a clearer flag named HTLC_F_WILL_SEND. The change also adds temporary debug logging that prints each HTLC's state when STFU is considered. There is no direct evidence in the commit that this fixes a security bug, but any change to state-machine logic around pending updates can affect protocol correctness.

Recommended action

Review the equivalence of the new HTLC_F_WILL_SEND check against the old HTLC_ADDING/HTLC_REMOVING + owner logic to ensure no pending-update cases are missed before STFU. Confirm no caller relied on uncommitted_ok=true. Treat as routine cleanup unless protocol-fuzzing or tests reveal a state mismatch.

Security signals we found

01

State-machine logic change for pending HTLC updates

02

STFU (quiescence) protocol precondition check modified

03

Removal of unused uncommitted_ok parameter changes semantics if any caller had passed true

04

Debug logging added to maybe_send_stfu

Risk score

Why this scored 27/100

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