multi: extract and pass through IsZombieChannel method

This commit is contained in:
Elle Mouton committed 2023-12-11 09:12:05 +02:00
1 parent 67df687f08
commit e12321cfd6
5 files changed
+77 -25

No files matched your search

+6
View File
@@ -102,6 +102,11 @@ type SyncManagerCfg struct {
// ActiveSync upon connection. These peers will never transition to
// PassiveSync.
PinnedSyncers PinnedSyncers
// IsStillZombieChannel takes the timestamps of the latest channel
// updates for a channel and returns true if the channel should be
// considered a zombie based on these timestamps.
IsStillZombieChannel func(time.Time, time.Time) bool
}
// SyncManager is a subsystem of the gossiper that manages the gossip syncers
@@ -501,6 +506,7 @@ func (m *SyncManager) createGossipSyncer(peer lnpeer.Peer) *GossipSyncer {
markGraphSynced: m.markGraphSynced,
maxQueryChanRangeReplies: maxQueryChanRangeReplies,
noTimestampQueryOption: m.cfg.NoTimestampQueries,
isStillZombieChannel: m.cfg.IsStillZombieChannel,
})
// Gossip syncers are initialized by default in a PassiveSync type