multi: add node omission list for blinded paths
This commit is contained in:
10 files changed
+1254
-1142
No files matched your search
@@ -5788,6 +5788,7 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
|
||||
MinDistanceFromIntroNode: globalBlindCfg.MinNumRealHops,
|
||||
NumHops: globalBlindCfg.NumHops,
|
||||
MaxNumPaths: globalBlindCfg.MaxNumPaths,
|
||||
NodeOmissionSet: fn.NewSet[route.Vertex](),
|
||||
}
|
||||
|
||||
if blind {
|
||||
@@ -5802,6 +5803,15 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
|
||||
blindingRestrictions.MaxNumPaths =
|
||||
uint8(*blindCfg.MaxNumPaths)
|
||||
}
|
||||
|
||||
for _, nodeIDBytes := range blindCfg.NodeOmissionList {
|
||||
vertex, err := route.NewVertexFromBytes(nodeIDBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
blindingRestrictions.NodeOmissionSet.Add(vertex)
|
||||
}
|
||||
}
|
||||
|
||||
if blindingRestrictions.MinDistanceFromIntroNode >
|
||||
|
||||
Reference in new issue
Block a user