lncli: expose max payment htlcs

This commit is contained in:
Joost Jager committed 2020-04-09 08:20:50 +02:00
1 parent e9bd691e6a
commit f5c3f930c4
1 file changed
+10 -1
+10 -1
View File
@@ -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 != "" {