Skip to content

Ill-timed crash can cause a missed RGS update #615

@TheBlueMatt

Description

@TheBlueMatt

Noticed while reviewing 613, it looks like if we do an RGS sync, get an update, apply it to the graph, then write the latest_rgs_snapshot_timestamp metric, then crash (skipping the NetworkGraph persist in the LDK Background Processor shutdown logic) we will lose some updates. On startup we'll sync from the latest_rgs_snapshot_timestamp metric rather than using https://docs.rs/lightning/latest/lightning/routing/gossip/struct.NetworkGraph.html#method.get_last_rapid_gossip_sync_timestamp leading to us simply losing the updates that were in the RGS update we previously synced. Not exactly critical, but might be worth using the NetworkGraph one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions