Skip to content

Commit 5c4dc2e

Browse files
committed
feature: add awareness of new taproot chans overlay feature bit
This bit will be false by default in current production deployments.
1 parent a9761f7 commit 5c4dc2e

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

feature/default_sets.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,8 @@ var defaultSetDesc = setDesc{
9292
SetInit: {}, // I
9393
SetNodeAnn: {}, // N
9494
},
95+
lnwire.SimpleTaprootOverlayChansOptional: {
96+
SetInit: {}, // I
97+
SetNodeAnn: {}, // N
98+
},
9599
}

feature/deps.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ var deps = depDesc{
8585
lnwire.RouteBlindingRequired: {
8686
lnwire.TLVOnionPayloadRequired: {},
8787
},
88+
lnwire.SimpleTaprootOverlayChansOptional: {
89+
lnwire.SimpleTaprootChannelsOptionalStaging: {},
90+
lnwire.TLVOnionPayloadOptional: {},
91+
lnwire.ScidAliasOptional: {},
92+
},
8893
}
8994

9095
// ValidateDeps asserts that a feature vector sets all features and their

feature/manager.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ type Config struct {
6363
// NoRouteBlinding unsets route blinding feature bits.
6464
NoRouteBlinding bool
6565

66+
// NoTaprootOverlay unsets the taproot overlay channel feature bits.
67+
NoTaprootOverlay bool
68+
6669
// CustomFeatures is a set of custom features to advertise in each
6770
// set.
6871
CustomFeatures map[Set][]lnwire.FeatureBit
@@ -188,6 +191,10 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
188191
raw.Unset(lnwire.RouteBlindingOptional)
189192
raw.Unset(lnwire.RouteBlindingRequired)
190193
}
194+
if cfg.NoTaprootOverlay {
195+
raw.Unset(lnwire.SimpleTaprootOverlayChansOptional)
196+
raw.Unset(lnwire.SimpleTaprootOverlayChansRequired)
197+
}
191198
for _, custom := range cfg.CustomFeatures[set] {
192199
if custom > set.Maximum() {
193200
return nil, fmt.Errorf("feature bit: %v "+

0 commit comments

Comments
 (0)