routing+lnrpc+lncli: allow setting min htlc policy

This commit is contained in:
Joost Jager
2019-11-15 11:24:58 +01:00
parent 74c2df658e
commit b6eb3a69ba
7 changed files with 633 additions and 567 deletions

View File

@@ -3459,6 +3459,12 @@ var updateChannelPolicyCommand = cli.Command{
Usage: "the CLTV delta that will be applied to all " +
"forwarded HTLCs",
},
cli.Uint64Flag{
Name: "min_htlc_msat",
Usage: "if set, the min HTLC size that will be applied " +
"to all forwarded HTLCs. If unset, the min HTLC " +
"is left unchanged.",
},
cli.Uint64Flag{
Name: "max_htlc_msat",
Usage: "if set, the max HTLC size that will be applied " +
@@ -3581,6 +3587,11 @@ func updateChannelPolicy(ctx *cli.Context) error {
MaxHtlcMsat: ctx.Uint64("max_htlc_msat"),
}
if ctx.IsSet("min_htlc_msat") {
req.MinHtlcMsat = ctx.Uint64("min_htlc_msat")
req.MinHtlcMsatSpecified = true
}
if chanPoint != nil {
req.Scope = &lnrpc.PolicyUpdateRequest_ChanPoint{
ChanPoint: chanPoint,