mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
feature: add awareness of new taproot chans overlay feature bit
This bit will be false by default in current production deployments.
This commit is contained in:
parent
7f9268c38f
commit
f21c1165a0
@ -92,4 +92,8 @@ var defaultSetDesc = setDesc{
|
|||||||
SetInit: {}, // I
|
SetInit: {}, // I
|
||||||
SetNodeAnn: {}, // N
|
SetNodeAnn: {}, // N
|
||||||
},
|
},
|
||||||
|
lnwire.SimpleTaprootOverlayChansOptional: {
|
||||||
|
SetInit: {}, // I
|
||||||
|
SetNodeAnn: {}, // N
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -79,6 +79,11 @@ var deps = depDesc{
|
|||||||
lnwire.AnchorsZeroFeeHtlcTxOptional: {},
|
lnwire.AnchorsZeroFeeHtlcTxOptional: {},
|
||||||
lnwire.ExplicitChannelTypeOptional: {},
|
lnwire.ExplicitChannelTypeOptional: {},
|
||||||
},
|
},
|
||||||
|
lnwire.SimpleTaprootOverlayChansOptional: {
|
||||||
|
lnwire.SimpleTaprootChannelsOptionalStaging: {},
|
||||||
|
lnwire.TLVOnionPayloadOptional: {},
|
||||||
|
lnwire.ScidAliasOptional: {},
|
||||||
|
},
|
||||||
lnwire.RouteBlindingOptional: {
|
lnwire.RouteBlindingOptional: {
|
||||||
lnwire.TLVOnionPayloadOptional: {},
|
lnwire.TLVOnionPayloadOptional: {},
|
||||||
},
|
},
|
||||||
|
@ -63,6 +63,9 @@ type Config struct {
|
|||||||
// NoRouteBlinding unsets route blinding feature bits.
|
// NoRouteBlinding unsets route blinding feature bits.
|
||||||
NoRouteBlinding bool
|
NoRouteBlinding bool
|
||||||
|
|
||||||
|
// NoTaprootOverlay unsets the taproot overlay channel feature bits.
|
||||||
|
NoTaprootOverlay bool
|
||||||
|
|
||||||
// CustomFeatures is a set of custom features to advertise in each
|
// CustomFeatures is a set of custom features to advertise in each
|
||||||
// set.
|
// set.
|
||||||
CustomFeatures map[Set][]lnwire.FeatureBit
|
CustomFeatures map[Set][]lnwire.FeatureBit
|
||||||
@ -192,6 +195,10 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
|
|||||||
raw.Unset(lnwire.Bolt11BlindedPathsOptional)
|
raw.Unset(lnwire.Bolt11BlindedPathsOptional)
|
||||||
raw.Unset(lnwire.Bolt11BlindedPathsRequired)
|
raw.Unset(lnwire.Bolt11BlindedPathsRequired)
|
||||||
}
|
}
|
||||||
|
if cfg.NoTaprootOverlay {
|
||||||
|
raw.Unset(lnwire.SimpleTaprootOverlayChansOptional)
|
||||||
|
raw.Unset(lnwire.SimpleTaprootOverlayChansRequired)
|
||||||
|
}
|
||||||
for _, custom := range cfg.CustomFeatures[set] {
|
for _, custom := range cfg.CustomFeatures[set] {
|
||||||
if custom > set.Maximum() {
|
if custom > set.Maximum() {
|
||||||
return nil, fmt.Errorf("feature bit: %v "+
|
return nil, fmt.Errorf("feature bit: %v "+
|
||||||
|
Loading…
Reference in New Issue
Block a user