multi: add blinded route to route requests expressed as hints

Add the option to include a blinded route in a route request (exclusive
to including hop hints, because it's incongruous to include both), and
express the route as a chain of hop hints.

Using a chain of hints over a single hint to represent the whole path
allows us to re-use our route construction to fill in a lot of the
path on our behalf.
This commit is contained in:
Carla Kirk-Cohen
2022-12-15 16:48:56 -05:00
committed by Olaoluwa Osuntokun
parent 48e36d93d4
commit c9609b8214
7 changed files with 501 additions and 18 deletions

View File

@@ -327,7 +327,7 @@ func (r *RouterBackend) QueryRoutes(ctx context.Context,
// the route.
routeReq, err := routing.NewRouteRequest(
sourcePubKey, &targetPubKey, amt, in.TimePref, restrictions,
customRecords, routeHintEdges, finalCLTVDelta,
customRecords, routeHintEdges, nil, finalCLTVDelta,
)
if err != nil {
return nil, err

View File

@@ -404,7 +404,7 @@ func (s *Server) EstimateRouteFee(ctx context.Context,
FeeLimit: feeLimit,
CltvLimit: s.cfg.RouterBackend.MaxTotalTimelock,
ProbabilitySource: mc.GetProbability,
}, nil, nil, s.cfg.RouterBackend.DefaultFinalCltvDelta,
}, nil, nil, nil, s.cfg.RouterBackend.DefaultFinalCltvDelta,
)
if err != nil {
return nil, err