Skip to content

Commit 43edfeb

Browse files
committed
routerrpc: rename var and add more comments
1 parent fd7f6ca commit 43edfeb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lnrpc/routerrpc/router_server.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,10 @@ func (s *Server) probeDestination(dest []byte, amtSat int64) (*RouteFeeResponse,
509509
// node. If the route hints don't indicate an LSP, they are passed as arguments
510510
// to the SendPayment_V2 method, which enable it to send probe payments to the
511511
// payment request destination.
512+
//
513+
// NOTE: Be aware that because of the special heuristic that is applied to
514+
// identify LSPs, the probe payment might use a different node id as the
515+
// final destination (the assumed LSP node id).
512516
func (s *Server) probePaymentRequest(ctx context.Context, paymentRequest string,
513517
timeout uint32) (*RouteFeeResponse, error) {
514518

@@ -676,11 +680,11 @@ func isLSP(routeHints [][]zpay32.HopHint,
676680
return false
677681
}
678682

679-
idMatchesRefNode := bytes.Equal(
683+
matchesDestNode := bytes.Equal(
680684
lastHop.NodeID.SerializeCompressed(),
681685
destHopHint.NodeID.SerializeCompressed(),
682686
)
683-
if !idMatchesRefNode {
687+
if !matchesDestNode {
684688
return false
685689
}
686690
}

0 commit comments

Comments
 (0)