mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 15:40:59 +02:00
routerrpc: rename var and add more comments
This commit is contained in:
@@ -509,6 +509,10 @@ func (s *Server) probeDestination(dest []byte, amtSat int64) (*RouteFeeResponse,
|
|||||||
// node. If the route hints don't indicate an LSP, they are passed as arguments
|
// node. If the route hints don't indicate an LSP, they are passed as arguments
|
||||||
// to the SendPayment_V2 method, which enable it to send probe payments to the
|
// to the SendPayment_V2 method, which enable it to send probe payments to the
|
||||||
// payment request destination.
|
// payment request destination.
|
||||||
|
//
|
||||||
|
// NOTE: Be aware that because of the special heuristic that is applied to
|
||||||
|
// identify LSPs, the probe payment might use a different node id as the
|
||||||
|
// final destination (the assumed LSP node id).
|
||||||
func (s *Server) probePaymentRequest(ctx context.Context, paymentRequest string,
|
func (s *Server) probePaymentRequest(ctx context.Context, paymentRequest string,
|
||||||
timeout uint32) (*RouteFeeResponse, error) {
|
timeout uint32) (*RouteFeeResponse, error) {
|
||||||
|
|
||||||
@@ -676,11 +680,11 @@ func isLSP(routeHints [][]zpay32.HopHint,
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
idMatchesRefNode := bytes.Equal(
|
matchesDestNode := bytes.Equal(
|
||||||
lastHop.NodeID.SerializeCompressed(),
|
lastHop.NodeID.SerializeCompressed(),
|
||||||
destHopHint.NodeID.SerializeCompressed(),
|
destHopHint.NodeID.SerializeCompressed(),
|
||||||
)
|
)
|
||||||
if !idMatchesRefNode {
|
if !matchesDestNode {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user