Skip to content

Commit d24699d

Browse files
bhandrasguggero
authored andcommitted
lndclient: add TimePref to SendPaymentRequest
1 parent f3796a3 commit d24699d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

router_client.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,11 @@ type SendPaymentRequest struct {
276276

277277
// If set, circular payments to self are permitted.
278278
AllowSelfPayment bool
279+
280+
// The time preference for this payment. Set to -1 to optimize for fees
281+
// only, to 1 to optimize for reliability only or a value in-between for
282+
// a mix.
283+
TimePref float64
279284
}
280285

281286
// InterceptedHtlc contains information about a htlc that was intercepted in
@@ -393,6 +398,7 @@ func (r *routerClient) SendPayment(ctx context.Context,
393398
MaxParts: request.MaxParts,
394399
OutgoingChanIds: request.OutgoingChanIds,
395400
AllowSelfPayment: request.AllowSelfPayment,
401+
TimePref: request.TimePref,
396402
}
397403
if request.MaxCltv != nil {
398404
rpcReq.CltvLimit = *request.MaxCltv

0 commit comments

Comments
 (0)