Skip to content

Commit 31df58e

Browse files
committed
routerrpc: rename var and add more comments
1 parent 0cad04b commit 31df58e

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

@@ -675,11 +679,11 @@ func isLSP(routeHints [][]zpay32.HopHint,
675679
return false
676680
}
677681

678-
idMatchesRefNode := bytes.Equal(
682+
matchesDestNode := bytes.Equal(
679683
lastHop.NodeID.SerializeCompressed(),
680684
destHopHint.NodeID.SerializeCompressed(),
681685
)
682-
if !idMatchesRefNode {
686+
if !matchesDestNode {
683687
return false
684688
}
685689
}

0 commit comments

Comments
 (0)