From dd2da29cba8e941c0b77c4e974adca097378c1ed Mon Sep 17 00:00:00 2001 From: Keagan McClelland Date: Wed, 3 Apr 2024 15:47:50 -0700 Subject: [PATCH] peer: re-add AuthGossiper nil check --- peer/brontide.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/peer/brontide.go b/peer/brontide.go index 864bdaca6..541c0f358 100644 --- a/peer/brontide.go +++ b/peer/brontide.go @@ -757,6 +757,13 @@ func (p *Brontide) initGossipSync() { if p.remoteFeatures.HasFeature(lnwire.GossipQueriesOptional) { p.log.Info("Negotiated chan series queries") + if p.cfg.AuthGossiper == nil { + // This should only ever be hit in the unit tests. + p.log.Warn("No AuthGossiper configured. Abandoning " + + "gossip sync.") + return + } + // Register the peer's gossip syncer with the gossiper. // This blocks synchronously to ensure the gossip syncer is // registered with the gossiper before attempting to read