From 5db01aeb5d7d5b3233eeefbf25cc229c3f778e55 Mon Sep 17 00:00:00 2001 From: MPins Date: Sat, 21 Sep 2024 01:04:00 -0300 Subject: [PATCH] lnd: add the option to set the income channel on blinded path It was made general enough to specify chained channels hops. --- rpcserver.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rpcserver.go b/rpcserver.go index 9bd69e4368..906fc14a7b 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -6020,6 +6020,7 @@ func (r *rpcServer) AddInvoice(ctx context.Context, NumHops: globalBlindCfg.NumHops, MaxNumPaths: globalBlindCfg.MaxNumPaths, NodeOmissionSet: fn.NewSet[route.Vertex](), + ChannelIncomeSet: make([]uint64, 0), } if blindCfg != nil && !blind { @@ -6048,6 +6049,12 @@ func (r *rpcServer) AddInvoice(ctx context.Context, blindingRestrictions.NodeOmissionSet.Add(vertex) } + + blindingRestrictions.ChannelIncomeSet = append( + blindingRestrictions.ChannelIncomeSet, + blindCfg.ChannelIncomeList..., + ) + } if blindingRestrictions.MinDistanceFromIntroNode >