2019-11-08 16:29:16 +03: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
|
|
|
|
SetLegacyGlobal: {},
|
|
|
|
},
|
2020-11-07 04:48:58 +03:00
|
|
|
lnwire.StaticRemoteKeyRequired: {
|
2019-11-08 16:29:16 +03:00
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
SetLegacyGlobal: {},
|
|
|
|
},
|
2019-12-03 12:38:29 +03:00
|
|
|
lnwire.UpfrontShutdownScriptOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2020-11-07 06:16:35 +03:00
|
|
|
lnwire.PaymentAddrRequired: {
|
2019-12-19 10:58:11 +03:00
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
SetInvoice: {}, // 9
|
|
|
|
},
|
|
|
|
lnwire.MPPOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
SetInvoice: {}, // 9
|
|
|
|
},
|
2020-12-07 16:12:45 +03:00
|
|
|
lnwire.AnchorsZeroFeeHtlcTxOptional: {
|
2020-03-06 18:11:48 +03:00
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2020-07-02 07:03:12 +03:00
|
|
|
lnwire.WumboChannelsOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
},
|
2021-03-25 05:48:08 +03:00
|
|
|
lnwire.AMPOptional: {
|
|
|
|
SetInit: {}, // I
|
|
|
|
SetNodeAnn: {}, // N
|
|
|
|
SetInvoice: {}, // 9
|
|
|
|
},
|
2019-11-08 16:29:16 +03:00
|
|
|
}
|