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

channeldb: add tombstone option and isOutpointClosed helper

Public commit record

What the developer wrote

Authored by ziggie

73/100 · Adequate
channeldb: add tombstone option and isOutpointClosed helper

Add the option, field, and reader helper that the tombstone close path
will consume in the next commit. Nothing is wired yet:

- OptionTombstoneClosedChannels — option modifier that sets the new
Options.tombstoneClosedChannels field. Defaults to off.
- ChannelStateDB.tombstoneClosedChannels — the decision-bit, set at
construction from the option.
- isOutpointClosed(opBucket, chanKey) — decodes the indexStatus TLV
stored under outpointBucket and reports true for entries flipped to
outpointClosed by updateClosedOutpointIndex (called from both close
paths). The helper accepts the bucket directly so loop-style
callers can hoist the tx.ReadBucket(outpointBucket) lookup out of
the inner loop and pay it once per iteration set.

Reusing outpointBucket as the "logically closed" signal avoids a
dedicated tombstone bucket. The flip from outpointOpen to outpointClosed
is already performed by the existing close path, so the signal exists on
both backends — readers just need to consult it.

Behavior is unchanged. The option and helper have no callers yet; the
close-path branch and reader audit land in the next two commits.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit only adds unused infrastructure for a future feature. It introduces a new option flag, a database field, and a small helper function to check whether a channel has been closed, but nothing is actually wired up or used yet. Behavior is unchanged, and there is no active security issue in this patch.

Recommended action

No action required for this commit. Monitor the follow-up commits that wire the tombstone close path and audit reader usage for consistency with existing close-path semantics.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

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