lnd.xprv/feature/default_sets.go
Olaoluwa Osuntokun 3825b9e463
feature: flip static remote key from optional to required
It's been sometime since we introduced this new safety enhancing feature
bit. At this point, we're now moving to require it as it makes our SCB
recovery system more robust, and it's also an implicit feature bit for
for anchor commitments as they're defined now.
2020-11-11 19:45:37 -08:00

55 lines
1.3 KiB
Go

package feature
import "github.com/lightningnetwork/lnd/lnwire"
// setDesc describes which feature bits should be advertised in which feature
// sets.
type setDesc map[lnwire.FeatureBit]map[Set]struct{}
// defaultSetDesc are the default set descriptors for generating feature
// vectors. Each set is annotated with the corresponding identifier from BOLT 9
// indicating where it should be advertised.
var defaultSetDesc = setDesc{
lnwire.DataLossProtectRequired: {
SetInit: {}, // I
SetNodeAnn: {}, // N
},
lnwire.GossipQueriesOptional: {
SetInit: {}, // I
SetNodeAnn: {}, // N
},
lnwire.TLVOnionPayloadOptional: {
SetInit: {}, // I
SetNodeAnn: {}, // N
SetInvoice: {}, // 9
SetLegacyGlobal: {},
},
lnwire.StaticRemoteKeyRequired: {
SetInit: {}, // I
SetNodeAnn: {}, // N
SetLegacyGlobal: {},
},
lnwire.UpfrontShutdownScriptOptional: {
SetInit: {}, // I
SetNodeAnn: {}, // N
},
lnwire.PaymentAddrOptional: {
SetInit: {}, // I
SetNodeAnn: {}, // N
SetInvoice: {}, // 9
},
lnwire.MPPOptional: {
SetInit: {}, // I
SetNodeAnn: {}, // N
SetInvoice: {}, // 9
},
lnwire.AnchorsOptional: {
SetInit: {}, // I
SetNodeAnn: {}, // N
},
lnwire.WumboChannelsOptional: {
SetInit: {}, // I
SetNodeAnn: {}, // N
},
}