From dad53b3f9a96335715e2f6bbf68cd8ef463b0242 Mon Sep 17 00:00:00 2001 From: Keagan McClelland Date: Tue, 2 Apr 2024 16:43:27 -0700 Subject: [PATCH] Revert "feature: make gossip queries compulsory" This reverts commit 717facc2020315652f66988cdab15bc75c313357. It turns out that we can't do this since it would result in incompatibility with LDK. The spec has been updated to reallow optional gossip queries so we revert this commit. --- feature/default_sets.go | 2 +- feature/manager_internal_test.go | 8 ++++---- peer/brontide.go | 7 ------- peer/brontide_test.go | 1 - 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/feature/default_sets.go b/feature/default_sets.go index e423ad08d..3b7e0f7ea 100644 --- a/feature/default_sets.go +++ b/feature/default_sets.go @@ -14,7 +14,7 @@ var defaultSetDesc = setDesc{ SetInit: {}, // I SetNodeAnn: {}, // N }, - lnwire.GossipQueriesRequired: { + lnwire.GossipQueriesOptional: { SetInit: {}, // I SetNodeAnn: {}, // N }, diff --git a/feature/manager_internal_test.go b/feature/manager_internal_test.go index dc254adf9..683b4dfa3 100644 --- a/feature/manager_internal_test.go +++ b/feature/manager_internal_test.go @@ -151,7 +151,7 @@ func TestUpdateFeatureSets(t *testing.T) { SetInit: {}, // I SetNodeAnn: {}, // N }, - lnwire.GossipQueriesRequired: { + lnwire.GossipQueriesOptional: { SetNodeAnn: {}, // N }, } @@ -201,7 +201,7 @@ func TestUpdateFeatureSets(t *testing.T) { ), SetNodeAnn: lnwire.NewRawFeatureVector( lnwire.DataLossProtectRequired, - lnwire.GossipQueriesRequired, + lnwire.GossipQueriesOptional, lnwire.FeatureBit(1000), ), }, @@ -222,7 +222,7 @@ func TestUpdateFeatureSets(t *testing.T) { ), SetNodeAnn: lnwire.NewRawFeatureVector( lnwire.DataLossProtectRequired, - lnwire.GossipQueriesRequired, + lnwire.GossipQueriesOptional, ), }, config: Config{ @@ -242,7 +242,7 @@ func TestUpdateFeatureSets(t *testing.T) { ), SetNodeAnn: lnwire.NewRawFeatureVector( lnwire.DataLossProtectRequired, - lnwire.GossipQueriesRequired, + lnwire.GossipQueriesOptional, lnwire.FeatureBit(500), ), SetInvoice: lnwire.NewRawFeatureVector( diff --git a/peer/brontide.go b/peer/brontide.go index 541c0f358..864bdaca6 100644 --- a/peer/brontide.go +++ b/peer/brontide.go @@ -757,13 +757,6 @@ 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 diff --git a/peer/brontide_test.go b/peer/brontide_test.go index 46c1bec4d..8ea8846b2 100644 --- a/peer/brontide_test.go +++ b/peer/brontide_test.go @@ -1138,7 +1138,6 @@ func TestPeerCustomMessage(t *testing.T) { initReplyMsg := lnwire.NewInitMessage( lnwire.NewRawFeatureVector( lnwire.DataLossProtectRequired, - lnwire.GossipQueriesOptional, ), lnwire.NewRawFeatureVector(), )