mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
feature: make gossip queries compulsory
This commit is contained in:
parent
239103c2b3
commit
717facc202
@ -14,7 +14,7 @@ var defaultSetDesc = setDesc{
|
|||||||
SetInit: {}, // I
|
SetInit: {}, // I
|
||||||
SetNodeAnn: {}, // N
|
SetNodeAnn: {}, // N
|
||||||
},
|
},
|
||||||
lnwire.GossipQueriesOptional: {
|
lnwire.GossipQueriesRequired: {
|
||||||
SetInit: {}, // I
|
SetInit: {}, // I
|
||||||
SetNodeAnn: {}, // N
|
SetNodeAnn: {}, // N
|
||||||
},
|
},
|
||||||
|
@ -150,7 +150,7 @@ func TestUpdateFeatureSets(t *testing.T) {
|
|||||||
SetInit: {}, // I
|
SetInit: {}, // I
|
||||||
SetNodeAnn: {}, // N
|
SetNodeAnn: {}, // N
|
||||||
},
|
},
|
||||||
lnwire.GossipQueriesOptional: {
|
lnwire.GossipQueriesRequired: {
|
||||||
SetNodeAnn: {}, // N
|
SetNodeAnn: {}, // N
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -200,7 +200,7 @@ func TestUpdateFeatureSets(t *testing.T) {
|
|||||||
),
|
),
|
||||||
SetNodeAnn: lnwire.NewRawFeatureVector(
|
SetNodeAnn: lnwire.NewRawFeatureVector(
|
||||||
lnwire.DataLossProtectRequired,
|
lnwire.DataLossProtectRequired,
|
||||||
lnwire.GossipQueriesOptional,
|
lnwire.GossipQueriesRequired,
|
||||||
lnwire.FeatureBit(1000),
|
lnwire.FeatureBit(1000),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@ -221,7 +221,7 @@ func TestUpdateFeatureSets(t *testing.T) {
|
|||||||
),
|
),
|
||||||
SetNodeAnn: lnwire.NewRawFeatureVector(
|
SetNodeAnn: lnwire.NewRawFeatureVector(
|
||||||
lnwire.DataLossProtectRequired,
|
lnwire.DataLossProtectRequired,
|
||||||
lnwire.GossipQueriesOptional,
|
lnwire.GossipQueriesRequired,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
config: Config{
|
config: Config{
|
||||||
@ -241,7 +241,7 @@ func TestUpdateFeatureSets(t *testing.T) {
|
|||||||
),
|
),
|
||||||
SetNodeAnn: lnwire.NewRawFeatureVector(
|
SetNodeAnn: lnwire.NewRawFeatureVector(
|
||||||
lnwire.DataLossProtectRequired,
|
lnwire.DataLossProtectRequired,
|
||||||
lnwire.GossipQueriesOptional,
|
lnwire.GossipQueriesRequired,
|
||||||
lnwire.FeatureBit(500),
|
lnwire.FeatureBit(500),
|
||||||
),
|
),
|
||||||
SetInvoice: lnwire.NewRawFeatureVector(
|
SetInvoice: lnwire.NewRawFeatureVector(
|
||||||
|
@ -754,6 +754,13 @@ 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
|
||||||
|
@ -1080,6 +1080,7 @@ 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…
Reference in New Issue
Block a user