]> git.bitcoin.ninja Git - rapid-gossip-sync-server/commit
Detect beginning of static channel status streaks.
authorArik Sosman <git@arik.io>
Thu, 9 May 2024 06:58:29 +0000 (23:58 -0700)
committerArik Sosman <git@arik.io>
Fri, 10 May 2024 16:40:30 +0000 (09:40 -0700)
commit2488d9dfb30511675e192e08517fe517a6a96388
tree8d70afd6821c675a2330e44bb0437039d89f72a9
parent1c181eeae185d576c70592571550b3e4ba004446
Detect beginning of static channel status streaks.

Previously, whenever a channel hasn't received updates in
6+ days, we would automatically send incremental reminders
that only contain the update flags.

However, if a channel has been received updates
within that six-day-timeframe, but all those updates were
identical, it would result in no updates being added to the
snapshot because the mutation set ended up empty and that
data would get purged from the serialization.

In order to avoid the reminder logic being duped by
channels simply being consistent, we now look up the
beginning of the latest continuous stretch of non-mutating
channel updates. If a channel's details have not been
altered in more than six days, we now send reminders no
matter the frequency with which channel updates have been
received since.
src/lookup.rs
src/serialization.rs