File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -284,6 +284,13 @@ type SendPaymentRequest struct {
284284
285285 // AMP is set to true if the payment should be an AMP payment.
286286 AMP bool
287+
288+ // If set, the payment loop can be interrupted by manually canceling
289+ // the payment context, even before the payment timeout is reached.
290+ // Note that the payment may still succeed after cancellation, as
291+ // in-flight attempts can still settle afterward. Canceling will only
292+ // prevent further attempts from being sent.
293+ Cancelable bool
287294}
288295
289296// InterceptedHtlc contains information about a htlc that was intercepted in
@@ -403,6 +410,7 @@ func (r *routerClient) SendPayment(ctx context.Context,
403410 AllowSelfPayment : request .AllowSelfPayment ,
404411 Amp : request .AMP ,
405412 TimePref : request .TimePref ,
413+ Cancelable : request .Cancelable ,
406414 }
407415 if request .MaxCltv != nil {
408416 rpcReq .CltvLimit = * request .MaxCltv
You can’t perform that action at this time.
0 commit comments