lncli: allow users to update max HTLC channel policies

In this commit, we enable callers of UpdateChannelPolicy to
specify their desired max HTLC forwarding policy for one or
multiple channels over lncli.
This commit is contained in:
Valentine Wallace 2019-08-19 17:56:13 -07:00 committed by Joost Jager
parent 4b9da07e78
commit 5aefe8bc70
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7

@ -3337,7 +3337,8 @@ var updateChannelPolicyCommand = cli.Command{
Category: "Channels",
Usage: "Update the channel policy for all channels, or a single " +
"channel.",
ArgsUsage: "base_fee_msat fee_rate time_lock_delta [channel_point]",
ArgsUsage: "base_fee_msat fee_rate time_lock_delta " +
"[--max_htlc_msat=N] [channel_point]",
Description: `
Updates the channel policy for all channels, or just a particular channel
identified by its channel point. The update will be committed, and
@ -3362,6 +3363,12 @@ var updateChannelPolicyCommand = cli.Command{
Usage: "the CLTV delta that will be applied to all " +
"forwarded HTLCs",
},
cli.Uint64Flag{
Name: "max_htlc_msat",
Usage: "if set, the max HTLC size that will be applied " +
"to all forwarded HTLCs. If unset, the max HTLC " +
"is left unchanged.",
},
cli.StringFlag{
Name: "chan_point",
Usage: "The channel whose fee policy should be " +
@ -3475,6 +3482,7 @@ func updateChannelPolicy(ctx *cli.Context) error {
BaseFeeMsat: baseFee,
FeeRate: feeRate,
TimeLockDelta: uint32(timeLockDelta),
MaxHtlcMsat: ctx.Uint64("max_htlc_msat"),
}
if chanPoint != nil {