mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 14:22:37 +01:00
Revert "feature: make gossip queries compulsory"
This reverts commit 717facc202
.
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.
This commit is contained in:
parent
b1175514f9
commit
dad53b3f9a
4 changed files with 5 additions and 13 deletions
|
@ -14,7 +14,7 @@ var defaultSetDesc = setDesc{
|
||||||
SetInit: {}, // I
|
SetInit: {}, // I
|
||||||
SetNodeAnn: {}, // N
|
SetNodeAnn: {}, // N
|
||||||
},
|
},
|
||||||
lnwire.GossipQueriesRequired: {
|
lnwire.GossipQueriesOptional: {
|
||||||
SetInit: {}, // I
|
SetInit: {}, // I
|
||||||
SetNodeAnn: {}, // N
|
SetNodeAnn: {}, // N
|
||||||
},
|
},
|
||||||
|
|
|
@ -151,7 +151,7 @@ func TestUpdateFeatureSets(t *testing.T) {
|
||||||
SetInit: {}, // I
|
SetInit: {}, // I
|
||||||
SetNodeAnn: {}, // N
|
SetNodeAnn: {}, // N
|
||||||
},
|
},
|
||||||
lnwire.GossipQueriesRequired: {
|
lnwire.GossipQueriesOptional: {
|
||||||
SetNodeAnn: {}, // N
|
SetNodeAnn: {}, // N
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ func TestUpdateFeatureSets(t *testing.T) {
|
||||||
),
|
),
|
||||||
SetNodeAnn: lnwire.NewRawFeatureVector(
|
SetNodeAnn: lnwire.NewRawFeatureVector(
|
||||||
lnwire.DataLossProtectRequired,
|
lnwire.DataLossProtectRequired,
|
||||||
lnwire.GossipQueriesRequired,
|
lnwire.GossipQueriesOptional,
|
||||||
lnwire.FeatureBit(1000),
|
lnwire.FeatureBit(1000),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
@ -222,7 +222,7 @@ func TestUpdateFeatureSets(t *testing.T) {
|
||||||
),
|
),
|
||||||
SetNodeAnn: lnwire.NewRawFeatureVector(
|
SetNodeAnn: lnwire.NewRawFeatureVector(
|
||||||
lnwire.DataLossProtectRequired,
|
lnwire.DataLossProtectRequired,
|
||||||
lnwire.GossipQueriesRequired,
|
lnwire.GossipQueriesOptional,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
config: Config{
|
config: Config{
|
||||||
|
@ -242,7 +242,7 @@ func TestUpdateFeatureSets(t *testing.T) {
|
||||||
),
|
),
|
||||||
SetNodeAnn: lnwire.NewRawFeatureVector(
|
SetNodeAnn: lnwire.NewRawFeatureVector(
|
||||||
lnwire.DataLossProtectRequired,
|
lnwire.DataLossProtectRequired,
|
||||||
lnwire.GossipQueriesRequired,
|
lnwire.GossipQueriesOptional,
|
||||||
lnwire.FeatureBit(500),
|
lnwire.FeatureBit(500),
|
||||||
),
|
),
|
||||||
SetInvoice: lnwire.NewRawFeatureVector(
|
SetInvoice: lnwire.NewRawFeatureVector(
|
||||||
|
|
|
@ -757,13 +757,6 @@ func (p *Brontide) initGossipSync() {
|
||||||
if p.remoteFeatures.HasFeature(lnwire.GossipQueriesOptional) {
|
if p.remoteFeatures.HasFeature(lnwire.GossipQueriesOptional) {
|
||||||
p.log.Info("Negotiated chan series queries")
|
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.
|
// Register the peer's gossip syncer with the gossiper.
|
||||||
// This blocks synchronously to ensure the gossip syncer is
|
// This blocks synchronously to ensure the gossip syncer is
|
||||||
// registered with the gossiper before attempting to read
|
// registered with the gossiper before attempting to read
|
||||||
|
|
|
@ -1138,7 +1138,6 @@ func TestPeerCustomMessage(t *testing.T) {
|
||||||
initReplyMsg := lnwire.NewInitMessage(
|
initReplyMsg := lnwire.NewInitMessage(
|
||||||
lnwire.NewRawFeatureVector(
|
lnwire.NewRawFeatureVector(
|
||||||
lnwire.DataLossProtectRequired,
|
lnwire.DataLossProtectRequired,
|
||||||
lnwire.GossipQueriesOptional,
|
|
||||||
),
|
),
|
||||||
lnwire.NewRawFeatureVector(),
|
lnwire.NewRawFeatureVector(),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue