From f5c3f930c40f2bac2c7b635c8cc93287377f75c1 Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Fri, 27 Mar 2020 14:44:44 +0100 Subject: [PATCH] lncli: expose max payment htlcs --- cmd/lncli/cmd_pay.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cmd/lncli/cmd_pay.go b/cmd/lncli/cmd_pay.go index 34fb88e9..426c7516 100644 --- a/cmd/lncli/cmd_pay.go +++ b/cmd/lncli/cmd_pay.go @@ -52,6 +52,13 @@ var ( Usage: "if set, intermediate payment state updates will be " + "displayed", } + + maxHtlcsFlag = cli.UintFlag{ + Name: "max_htlcs", + Usage: "the maximum number of partial payments that may be " + + "used", + Value: 1, + } ) // paymentFlags returns common flags for sendpayment and payinvoice. @@ -88,7 +95,7 @@ func paymentFlags() []cli.Flag { Name: "allow_self_payment", Usage: "allow sending a circular payment to self", }, - dataFlag, showInflightFlag, + dataFlag, showInflightFlag, maxHtlcsFlag, } } @@ -318,6 +325,8 @@ func sendPaymentRequest(ctx *cli.Context, req.AllowSelfPayment = ctx.Bool("allow_self_payment") + req.MaxHtlcs = uint32(ctx.Uint(maxHtlcsFlag.Name)) + // Parse custom data records. data := ctx.String(dataFlag.Name) if data != "" {