diff --git a/lnrpc/routerrpc/router_server.go b/lnrpc/routerrpc/router_server.go index 58fa23622..6fd69c08a 100644 --- a/lnrpc/routerrpc/router_server.go +++ b/lnrpc/routerrpc/router_server.go @@ -558,6 +558,9 @@ func (s *Server) probePaymentRequest(ctx context.Context, paymentRequest string, // payment won't be blocked along the route to the destination. We send // a probe payment with unmodified route hints. if !isLSP(hints, s.cfg.RouterBackend.FetchChannelEndpoints) { + log.Infof("No LSP detected, probing destination %x", + probeRequest.Dest) + probeRequest.RouteHints = invoicesrpc.CreateRPCRouteHints(hints) return s.sendProbePayment(ctx, probeRequest) } @@ -571,9 +574,14 @@ func (s *Server) probePaymentRequest(ctx context.Context, paymentRequest string, return nil, err } + // Set the destination to the LSP node ID. + lspDest := lspHint.NodeID.SerializeCompressed() + probeRequest.Dest = lspDest + + log.Infof("LSP detected, probing LSP with destination: %x", lspDest) + // The adjusted route hints serve the payment probe to find the last // public hop to the LSP on the route. - probeRequest.Dest = lspHint.NodeID.SerializeCompressed() if len(lspAdjustedRouteHints) > 0 { probeRequest.RouteHints = invoicesrpc.CreateRPCRouteHints( lspAdjustedRouteHints, @@ -609,7 +617,8 @@ func (s *Server) probePaymentRequest(ctx context.Context, paymentRequest string, // Dispatch the payment probe with adjusted fee amount. resp, err := s.sendProbePayment(ctx, probeRequest) if err != nil { - return nil, err + return nil, fmt.Errorf("failed to send probe payment to "+ + "LSP with destination %x: %w", lspDest, err) } // If the payment probe failed we only return the failure reason and