Skip to content

Commit

Permalink
Merge pull request #177 from lightninglabs/sendpayment-timepref
Browse files Browse the repository at this point in the history
lndclient: add TimePref to SendPaymentRequest
  • Loading branch information
bhandras authored Mar 1, 2024
2 parents 0273f6e + f7d150a commit 60aca37
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 60aca37

Please sign in to comment.