decred / dcrlnd

Decred Lightning Network Daemon ⚡️
MIT License
36 stars 24 forks source link

discovery: Use last gossip timestamp in gossip queries #165

Closed matheusd closed 1 year ago

matheusd commented 1 year ago

This modifies the gossiper subsystem to persist the timestamp of the last received gossip message during active sync so that, upon restarting the sync, gossip messages generated after the stored timestamp will be relayed from the remote host to the local one.

This is needed to ensure that a node that remains offline for some time will still be able to fetch gossip messages (in particular, ChannelUpdates) to update their local view of the network correctly.

Before this commit, a node that remained offline for a significant fraction of time could miss many ChannelUpdate messages for existing channels, such that the channel would eventually be marked as zombie in the database.