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

gossipd: put the last_writes array inside struct gossip_store.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
gossipd: put the last_writes array inside struct gossip_store.

This is the file responsible for all the writing, so it should be
responsible for the rewriting if necessary (rather than
gossmap_manage).

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

What changed, and why it matters

This is a small internal code cleanup in the part of Core Lightning that saves network gossip messages to disk. It moves a bookkeeping array (used to recover from rare filesystem sync problems) from one internal structure into another, so the module that actually writes to disk also owns the recovery data. There is no user-facing change, no new feature, and no obvious security vulnerability introduced or fixed by this patch.

Recommended action

No security action required. Treat as normal code-quality refactor. If auditing, verify that `gossip_store_writes_confirmed` is always called after a successful `gossmap_manage_get_gossmap` refresh and that `last_writes` is freed on `gossip_store` destruction (tal parent ownership makes this likely).

Security signals we found

01

Refactor of existing reliability/recovery mechanism (last_writes rewrite on suspected fsync failure)

02

No change to wire protocol, RPC, or external interfaces

03

No new memory allocations or ownership patterns beyond moving existing tal array into another struct

04

No bounds-checking, parsing, or cryptographic changes

Risk score

Why this scored 15/100

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