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

wallet: don't show htlcs from closed channels in listhtlcs.

Public commit record

What the developer wrote

Authored by Rusty Russell

85/100 · Strong
wallet: don't show htlcs from closed channels in listhtlcs.

This doesn't happen yet, since we delete all HTLCs when we close a channel. But we're
about to change that, so update the wallet_htlcs_first() code to avoid them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This is a small, forward-looking cleanup change in Core Lightning's wallet code. It adjusts a database query so that the `listhtlcs` command will not return HTLCs (payment forwarding contracts) belonging to channels that have already been closed. The commit explicitly says this situation cannot happen yet because HTLCs are currently deleted when a channel closes, but the code is being prepared for an upcoming change where closed-channel HTLCs may be kept around.

Recommended action

No immediate action required. Treat as routine hardening. If the upcoming HTLC-retention change is being reviewed, verify that all other HTLC consumers (not just `listhtlcs`) correctly handle or exclude closed-channel HTLCs.

Security signals we found

01

Information-disclosure hardening: prevents future exposure of stale HTLC data from closed channels

02

Defensive query filter added to database iterator used by RPC output

03

No active vulnerability described; commit frames change as future-proofing

Risk score

Why this scored 18/100

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