From d24699d3ee777756286bbf99e9da7c17502838e9 Mon Sep 17 00:00:00 2001 From: Andras Banki-Horvath Date: Thu, 29 Feb 2024 18:58:48 +0100 Subject: [PATCH] lndclient: add TimePref to SendPaymentRequest --- router_client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/router_client.go b/router_client.go index 595546f..5c116f7 100644 --- a/router_client.go +++ b/router_client.go @@ -276,6 +276,11 @@ type SendPaymentRequest struct { // If set, circular payments to self are permitted. AllowSelfPayment bool + + // The time preference for this payment. Set to -1 to optimize for fees + // only, to 1 to optimize for reliability only or a value in-between for + // a mix. + TimePref float64 } // InterceptedHtlc contains information about a htlc that was intercepted in @@ -393,6 +398,7 @@ func (r *routerClient) SendPayment(ctx context.Context, MaxParts: request.MaxParts, OutgoingChanIds: request.OutgoingChanIds, AllowSelfPayment: request.AllowSelfPayment, + TimePref: request.TimePref, } if request.MaxCltv != nil { rpcReq.CltvLimit = *request.MaxCltv