multi: enable optional route blinding feature
This commit is contained in:
10 files changed
+383
-333
No files matched your search
@@ -79,6 +79,11 @@ var defaultSetDesc = setDesc{
|
||||
SetInit: {}, // I
|
||||
SetNodeAnn: {}, // N
|
||||
},
|
||||
lnwire.RouteBlindingOptional: {
|
||||
SetInit: {}, // I
|
||||
SetNodeAnn: {}, // N
|
||||
SetInvoice: {}, // 9
|
||||
},
|
||||
lnwire.ShutdownAnySegwitOptional: {
|
||||
SetInit: {}, // I
|
||||
SetNodeAnn: {}, // N
|
||||
|
||||
@@ -79,6 +79,12 @@ var deps = depDesc{
|
||||
lnwire.AnchorsZeroFeeHtlcTxOptional: {},
|
||||
lnwire.ExplicitChannelTypeOptional: {},
|
||||
},
|
||||
lnwire.RouteBlindingOptional: {
|
||||
lnwire.TLVOnionPayloadOptional: {},
|
||||
},
|
||||
lnwire.RouteBlindingRequired: {
|
||||
lnwire.TLVOnionPayloadRequired: {},
|
||||
},
|
||||
}
|
||||
|
||||
// ValidateDeps asserts that a feature vector sets all features and their
|
||||
|
||||
+9
-1
@@ -60,6 +60,9 @@ type Config struct {
|
||||
// segwit witness versions for co-op closes.
|
||||
NoAnySegwit bool
|
||||
|
||||
// NoRouteBlinding unsets route blinding feature bits.
|
||||
NoRouteBlinding bool
|
||||
|
||||
// CustomFeatures is a set of custom features to advertise in each
|
||||
// set.
|
||||
CustomFeatures map[Set][]lnwire.FeatureBit
|
||||
@@ -123,6 +126,8 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
|
||||
raw.Unset(lnwire.PaymentAddrRequired)
|
||||
raw.Unset(lnwire.MPPOptional)
|
||||
raw.Unset(lnwire.MPPRequired)
|
||||
raw.Unset(lnwire.RouteBlindingOptional)
|
||||
raw.Unset(lnwire.RouteBlindingRequired)
|
||||
raw.Unset(lnwire.AMPOptional)
|
||||
raw.Unset(lnwire.AMPRequired)
|
||||
raw.Unset(lnwire.KeysendOptional)
|
||||
@@ -179,7 +184,10 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
|
||||
raw.Unset(lnwire.SimpleTaprootChannelsOptionalStaging)
|
||||
raw.Unset(lnwire.SimpleTaprootChannelsRequiredStaging)
|
||||
}
|
||||
|
||||
if cfg.NoRouteBlinding {
|
||||
raw.Unset(lnwire.RouteBlindingOptional)
|
||||
raw.Unset(lnwire.RouteBlindingRequired)
|
||||
}
|
||||
for _, custom := range cfg.CustomFeatures[set] {
|
||||
if custom > set.Maximum() {
|
||||
return nil, fmt.Errorf("feature bit: %v "+
|
||||
|
||||
Reference in new issue
Block a user