diff --git a/clightning/clightning.go b/clightning/clightning.go index b6ac83e5..3e4bb936 100644 --- a/clightning/clightning.go +++ b/clightning/clightning.go @@ -640,17 +640,23 @@ func (cl *ClightningClient) ProbePayment(scid string, amountMsat uint64) (bool, } } - route, err := cl.glightning.GetRoute(channel.PeerId, amountMsat, 1, 0, cl.nodeId, 0, nil, 1) - if err != nil { - return false, "", fmt.Errorf("GetRoute() %w", err) - } preimage, err := lightning.GetPreimage() if err != nil { return false, "", fmt.Errorf("GetPreimage() %w", err) } paymentHash := preimage.Hash().String() _, err = cl.glightning.SendPay( - route, + []glightning.RouteHop{ + { + Id: channel.PeerId, + ShortChannelId: scid, + AmountMsat: glightning.AmountFromMSat(amountMsat), + // The total expected CLTV. + // The default GetRoute value of 9 is set here. + Delay: 9, + Direction: 0, + }, + }, paymentHash, "", amountMsat,