Skip to content

Commit 2717ce7

Browse files
Roasbeefguggero
authored andcommitted
feature: add awareness of new taproot chans overlay feature bit
This bit will be false by default in current production deployments.
1 parent 03b3050 commit 2717ce7

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
@@ -95,4 +95,8 @@ var defaultSetDesc = setDesc{
9595
lnwire.Bolt11BlindedPathsOptional: {
9696
SetInvoice: {}, // I
9797
},
98+
lnwire.SimpleTaprootOverlayChansOptional: {
99+
SetInit: {}, // I
100+
SetNodeAnn: {}, // N
101+
},
98102
}

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.Bolt11BlindedPathsOptional: {
8686
lnwire.RouteBlindingOptional: {},
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
@@ -192,6 +195,10 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
192195
raw.Unset(lnwire.Bolt11BlindedPathsOptional)
193196
raw.Unset(lnwire.Bolt11BlindedPathsRequired)
194197
}
198+
if cfg.NoTaprootOverlay {
199+
raw.Unset(lnwire.SimpleTaprootOverlayChansOptional)
200+
raw.Unset(lnwire.SimpleTaprootOverlayChansRequired)
201+
}
195202
for _, custom := range cfg.CustomFeatures[set] {
196203
if custom > set.Maximum() {
197204
return nil, fmt.Errorf("feature bit: %v "+

0 commit comments

Comments
 (0)