2019-11-08 05:29:16 -08:00
|
|
|
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
|
2021-05-06 09:14:49 -07:00
|
|
|
SetInvoiceAmp: {}, // 9A
|
2019-11-08 05:29:16 -08:00
|
|
|
SetLegacyGlobal: {},
|
|
|
|
},
|
2020-11-06 17:48:58 -08:00
|
|
|
lnwire.StaticRemoteKeyRequired: {
|
2019-11-08 05:29:16 -08:00
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
SetLegacyGlobal: {},
|
|
|
|
},
|
2019-12-03 11:38:29 +02:00
|
|
|
lnwire.UpfrontShutdownScriptOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2020-11-06 19:16:35 -08:00
|
|
|
lnwire.PaymentAddrRequired: {
|
2021-05-06 09:14:49 -07:00
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
SetInvoice: {}, // 9
|
|
|
|
SetInvoiceAmp: {}, // 9A
|
2019-12-18 23:58:11 -08:00
|
|
|
},
|
|
|
|
lnwire.MPPOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
SetInvoice: {}, // 9
|
|
|
|
},
|
2020-12-07 14:12:45 +01:00
|
|
|
lnwire.AnchorsZeroFeeHtlcTxOptional: {
|
2020-03-06 16:11:48 +01:00
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2020-07-01 21:03:12 -07:00
|
|
|
lnwire.WumboChannelsOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2021-03-24 19:48:08 -07:00
|
|
|
lnwire.AMPOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
2021-05-06 09:14:49 -07:00
|
|
|
},
|
|
|
|
lnwire.AMPRequired: {
|
|
|
|
SetInvoiceAmp: {}, // 9A
|
2021-03-24 19:48:08 -07:00
|
|
|
},
|
2021-03-03 19:39:12 -08:00
|
|
|
lnwire.ExplicitChannelTypeOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2022-04-14 13:54:57 +02:00
|
|
|
lnwire.KeysendOptional: {
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2021-07-13 15:20:46 -07:00
|
|
|
lnwire.ScriptEnforcedLeaseOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2022-04-04 15:16:13 -04:00
|
|
|
lnwire.ScidAliasOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
|
|
|
lnwire.ZeroConfOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2022-06-10 11:14:54 -07:00
|
|
|
lnwire.ShutdownAnySegwitOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2019-11-08 05:29:16 -08:00
|
|
|
}
|