lncli: add cltv limit
This commit is contained in:
parent
acb8fd4796
commit
ec0d241905
@ -1954,6 +1954,12 @@ func closedChannels(ctx *cli.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var cltvLimitFlag = cli.UintFlag{
|
||||
Name: "cltv_limit",
|
||||
Usage: "the maximum time lock that may be used for " +
|
||||
"this payment",
|
||||
}
|
||||
|
||||
var sendPaymentCommand = cli.Command{
|
||||
Name: "sendpayment",
|
||||
Category: "Payments",
|
||||
@ -2000,6 +2006,7 @@ var sendPaymentCommand = cli.Command{
|
||||
Usage: "percentage of the payment's amount used as the" +
|
||||
"maximum fee allowed when sending the payment",
|
||||
},
|
||||
cltvLimitFlag,
|
||||
cli.StringFlag{
|
||||
Name: "payment_hash, r",
|
||||
Usage: "the hash to use within the payment's HTLC",
|
||||
@ -2119,6 +2126,7 @@ func sendPayment(ctx *cli.Context) error {
|
||||
Amt: ctx.Int64("amt"),
|
||||
FeeLimit: feeLimit,
|
||||
OutgoingChanId: ctx.Uint64("outgoing_chan_id"),
|
||||
CltvLimit: uint32(ctx.Int(cltvLimitFlag.Name)),
|
||||
}
|
||||
|
||||
return sendPaymentRequest(client, req)
|
||||
@ -2266,6 +2274,7 @@ var payInvoiceCommand = cli.Command{
|
||||
Usage: "percentage of the payment's amount used as the" +
|
||||
"maximum fee allowed when sending the payment",
|
||||
},
|
||||
cltvLimitFlag,
|
||||
cli.Uint64Flag{
|
||||
Name: "outgoing_chan_id",
|
||||
Usage: "short channel id of the outgoing channel to " +
|
||||
@ -2312,7 +2321,9 @@ func payInvoice(ctx *cli.Context) error {
|
||||
Amt: ctx.Int64("amt"),
|
||||
FeeLimit: feeLimit,
|
||||
OutgoingChanId: ctx.Uint64("outgoing_chan_id"),
|
||||
CltvLimit: uint32(ctx.Int(cltvLimitFlag.Name)),
|
||||
}
|
||||
|
||||
return sendPaymentRequest(client, req)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user