multi: start asking for update timestamps in QueryChannelRange

This commit also adds a new `protocol.no-timestamp-query-option` option
to disable the new behaviour.
This commit is contained in:
Elle Mouton
2023-09-20 09:34:21 +02:00
parent 893147d83e
commit a439cc970f
9 changed files with 72 additions and 11 deletions

View File

@@ -73,6 +73,11 @@ type SyncManagerCfg struct {
// gossip syncers will be passive.
NumActiveSyncers int
// NoTimestampQueries will prevent the GossipSyncer from querying
// timestamps of announcement messages from the peer and from responding
// to timestamp queries
NoTimestampQueries bool
// RotateTicker is a ticker responsible for notifying the SyncManager
// when it should rotate its active syncers. A single active syncer with
// a chansSynced state will be exchanged for a passive syncer in order
@@ -495,6 +500,7 @@ func (m *SyncManager) createGossipSyncer(peer lnpeer.Peer) *GossipSyncer {
bestHeight: m.cfg.BestHeight,
markGraphSynced: m.markGraphSynced,
maxQueryChanRangeReplies: maxQueryChanRangeReplies,
noTimestampQueryOption: m.cfg.NoTimestampQueries,
})
// Gossip syncers are initialized by default in a PassiveSync type