2019-11-08 14:29:16 +01: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 18:14:49 +02:00
|
|
|
SetInvoiceAmp: {}, // 9A
|
2019-11-08 14:29:16 +01:00
|
|
|
SetLegacyGlobal: {},
|
|
|
|
},
|
2020-11-07 02:48:58 +01:00
|
|
|
lnwire.StaticRemoteKeyRequired: {
|
2019-11-08 14:29:16 +01:00
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
SetLegacyGlobal: {},
|
|
|
|
},
|
2019-12-03 10:38:29 +01:00
|
|
|
lnwire.UpfrontShutdownScriptOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2020-11-07 04:16:35 +01:00
|
|
|
lnwire.PaymentAddrRequired: {
|
2021-05-06 18:14:49 +02:00
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
SetInvoice: {}, // 9
|
|
|
|
SetInvoiceAmp: {}, // 9A
|
2019-12-19 08:58:11 +01: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-02 06:03:12 +02:00
|
|
|
lnwire.WumboChannelsOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2021-03-25 03:48:08 +01:00
|
|
|
lnwire.AMPOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
2021-05-06 18:14:49 +02:00
|
|
|
},
|
|
|
|
lnwire.AMPRequired: {
|
|
|
|
SetInvoiceAmp: {}, // 9A
|
2021-03-25 03:48:08 +01:00
|
|
|
},
|
2021-03-04 04:39:12 +01:00
|
|
|
lnwire.ExplicitChannelTypeOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2021-07-14 00:20:46 +02:00
|
|
|
lnwire.ScriptEnforcedLeaseOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2019-11-08 14:29:16 +01:00
|
|
|
}
|