mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
82ccab606c
In this commit, we move to start requiring the payment addr feature bit in the invoices we produce. With this change, if a user attempts to pay one of our invoices (assuming they're also an lnd node), then they'll receive an error when they attempt to pay. At this point, *most* lnd nodes should be on v0.11 at this point, and this change will notify any lagging wallet authors to update, as these payments are generally more secure.
55 lines
1.3 KiB
Go
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.PaymentAddrRequired: {
|
|
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
|
|
},
|
|
}
|