rpcserver: use SetBit helper for setting Bolt11 blinded bit

This commit uses the new SetBit helper for setting the Bolt11 route
blinding required bit in a generated invoice. This helper will take care
of setting the dependent bits of the feature bit (namely the route
blinding and TLV feature bits and will use the required variant of
both).
This commit is contained in:
Elle Mouton committed 2024-10-02 10:52:59 +02:00
1 parent 49a87469db
commit 4d44d11ece
2 files changed
+7 -2

No files matched your search

+3 -2
View File
@@ -6055,8 +6055,9 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
// understand the new BOLT 11 tagged field
// containing the blinded path, so we switch
// the bit to required.
v.Unset(lnwire.Bolt11BlindedPathsOptional)
v.Set(lnwire.Bolt11BlindedPathsRequired)
v = feature.SetBit(
v, lnwire.Bolt11BlindedPathsRequired,
)
}
return v