@@ -426,7 +426,7 @@ func (s *Server) EstimateRouteFee(ctx context.Context,
426426 return nil , errors .New ("amount must be greater than 0" )
427427
428428 default :
429- return s .probeDestination (req .Dest , req .AmtSat )
429+ return s .probeDestination (ctx , req .Dest , req .AmtSat )
430430 }
431431
432432 case isProbeInvoice :
@@ -440,8 +440,8 @@ func (s *Server) EstimateRouteFee(ctx context.Context,
440440
441441// probeDestination estimates fees along a route to a destination based on the
442442// contents of the local graph.
443- func (s * Server ) probeDestination (dest []byte , amtSat int64 ) ( * RouteFeeResponse ,
444- error ) {
443+ func (s * Server ) probeDestination (ctx context. Context , dest []byte ,
444+ amtSat int64 ) ( * RouteFeeResponse , error ) {
445445
446446 destNode , err := route .NewVertexFromBytes (dest )
447447 if err != nil {
@@ -469,7 +469,7 @@ func (s *Server) probeDestination(dest []byte, amtSat int64) (*RouteFeeResponse,
469469 return nil , err
470470 }
471471
472- route , _ , err := s .cfg .Router .FindRoute (routeReq )
472+ route , _ , err := s .cfg .Router .FindRoute (ctx , routeReq )
473473 if err != nil {
474474 return nil , err
475475 }
@@ -1429,7 +1429,7 @@ func (s *Server) trackPaymentStream(context context.Context,
14291429}
14301430
14311431// BuildRoute builds a route from a list of hop addresses.
1432- func (s * Server ) BuildRoute (_ context.Context ,
1432+ func (s * Server ) BuildRoute (ctx context.Context ,
14331433 req * BuildRouteRequest ) (* BuildRouteResponse , error ) {
14341434
14351435 if len (req .HopPubkeys ) == 0 {
@@ -1490,7 +1490,7 @@ func (s *Server) BuildRoute(_ context.Context,
14901490
14911491 // Build the route and return it to the caller.
14921492 route , err := s .cfg .Router .BuildRoute (
1493- amt , hops , outgoingChan , req .FinalCltvDelta , payAddr ,
1493+ ctx , amt , hops , outgoingChan , req .FinalCltvDelta , payAddr ,
14941494 firstHopBlob ,
14951495 )
14961496 if err != nil {
0 commit comments