mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 06:07:16 +01:00
feature: define new feature bit for bolt11 blinded paths
We need a new feature bit for BOLT11 invoices in order to indicate that they contain the new blinded path tagged field. Tagged fields pre-date TLV and so nodes who dont understand them will simply skip them. Therefore the feature bit helps them to fail fast.
This commit is contained in:
@@ -92,4 +92,7 @@ var defaultSetDesc = setDesc{
|
||||
SetInit: {}, // I
|
||||
SetNodeAnn: {}, // N
|
||||
},
|
||||
lnwire.Bolt11BlindedPathsOptional: {
|
||||
SetInvoice: {}, // I
|
||||
},
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ var deps = depDesc{
|
||||
lnwire.RouteBlindingOptional: {
|
||||
lnwire.TLVOnionPayloadOptional: {},
|
||||
},
|
||||
lnwire.RouteBlindingRequired: {
|
||||
lnwire.TLVOnionPayloadRequired: {},
|
||||
lnwire.Bolt11BlindedPathsOptional: {
|
||||
lnwire.RouteBlindingOptional: {},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -128,6 +128,8 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
|
||||
raw.Unset(lnwire.MPPRequired)
|
||||
raw.Unset(lnwire.RouteBlindingOptional)
|
||||
raw.Unset(lnwire.RouteBlindingRequired)
|
||||
raw.Unset(lnwire.Bolt11BlindedPathsOptional)
|
||||
raw.Unset(lnwire.Bolt11BlindedPathsRequired)
|
||||
raw.Unset(lnwire.AMPOptional)
|
||||
raw.Unset(lnwire.AMPRequired)
|
||||
raw.Unset(lnwire.KeysendOptional)
|
||||
@@ -187,6 +189,8 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
|
||||
if cfg.NoRouteBlinding {
|
||||
raw.Unset(lnwire.RouteBlindingOptional)
|
||||
raw.Unset(lnwire.RouteBlindingRequired)
|
||||
raw.Unset(lnwire.Bolt11BlindedPathsOptional)
|
||||
raw.Unset(lnwire.Bolt11BlindedPathsRequired)
|
||||
}
|
||||
for _, custom := range cfg.CustomFeatures[set] {
|
||||
if custom > set.Maximum() {
|
||||
|
||||
Reference in New Issue
Block a user