Skip to content

Commit 31f2bac

Browse files
committed
lnd: add the option to set the income node or channel on blinded path
1 parent 8fbb4dd commit 31f2bac

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

rpcserver.go

+15
Original file line numberDiff line numberDiff line change
@@ -6020,6 +6020,8 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
60206020
NumHops: globalBlindCfg.NumHops,
60216021
MaxNumPaths: globalBlindCfg.MaxNumPaths,
60226022
NodeOmissionSet: fn.NewSet[route.Vertex](),
6023+
NodeIncomeSet: fn.NewSet[route.Vertex](),
6024+
ChannelIncomeSet: fn.NewSet[uint64](),
60236025
}
60246026

60256027
if blindCfg != nil && !blind {
@@ -6048,6 +6050,19 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
60486050

60496051
blindingRestrictions.NodeOmissionSet.Add(vertex)
60506052
}
6053+
6054+
for _, nodeIDBytes := range blindCfg.NodeIncomeList {
6055+
vertex, err := route.NewVertexFromBytes(nodeIDBytes)
6056+
if err != nil {
6057+
return nil, err
6058+
}
6059+
6060+
blindingRestrictions.NodeIncomeSet.Add(vertex)
6061+
}
6062+
6063+
for _, channelId := range blindCfg.ChannelIncomeList {
6064+
blindingRestrictions.ChannelIncomeSet.Add(channelId)
6065+
}
60516066
}
60526067

60536068
if blindingRestrictions.MinDistanceFromIntroNode >

0 commit comments

Comments
 (0)