Skip to content

Commit

Permalink
lndclient: add TimePref to SendPaymentRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
bhandras authored and guggero committed Aug 26, 2024
1 parent f3796a3 commit d24699d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions router_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d24699d

Please sign in to comment.