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
|
||||
SetNodeAnn: {}, // N
|
||||
},
|
||||
lnwire.SimpleTaprootOverlayChansOptional: {
|
||||
SetInit: {}, // I
|
||||
SetNodeAnn: {}, // N
|
||||
},
|
||||
}
|
||||
|
@ -79,6 +79,11 @@ var deps = depDesc{
|
||||
lnwire.AnchorsZeroFeeHtlcTxOptional: {},
|
||||
lnwire.ExplicitChannelTypeOptional: {},
|
||||
},
|
||||
lnwire.SimpleTaprootOverlayChansOptional: {
|
||||
lnwire.SimpleTaprootChannelsOptionalStaging: {},
|
||||
lnwire.TLVOnionPayloadOptional: {},
|
||||
lnwire.ScidAliasOptional: {},
|
||||
},
|
||||
lnwire.RouteBlindingOptional: {
|
||||
lnwire.TLVOnionPayloadOptional: {},
|
||||
},
|
||||
|
@ -63,6 +63,9 @@ type Config struct {
|
||||
// NoRouteBlinding unsets route blinding feature bits.
|
||||
NoRouteBlinding bool
|
||||
|
||||
// NoTaprootOverlay unsets the taproot overlay channel feature bits.
|
||||
NoTaprootOverlay bool
|
||||
|
||||
// CustomFeatures is a set of custom features to advertise in each
|
||||
// set.
|
||||
CustomFeatures map[Set][]lnwire.FeatureBit
|
||||
@ -192,6 +195,10 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
|
||||
raw.Unset(lnwire.Bolt11BlindedPathsOptional)
|
||||
raw.Unset(lnwire.Bolt11BlindedPathsRequired)
|
||||
}
|
||||
if cfg.NoTaprootOverlay {
|
||||
raw.Unset(lnwire.SimpleTaprootOverlayChansOptional)
|
||||
raw.Unset(lnwire.SimpleTaprootOverlayChansRequired)
|
||||
}
|
||||
for _, custom := range cfg.CustomFeatures[set] {
|
||||
if custom > set.Maximum() {
|
||||
return nil, fmt.Errorf("feature bit: %v "+
|
||||
|
Loading…
Reference in New Issue
Block a user