mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-31 08:02:25 +02:00
multi: add node omission list for blinded paths
This commit is contained in:
10
rpcserver.go
10
rpcserver.go
@@ -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