routing+lnrpc+lncli: allow setting min htlc policy

This commit is contained in:
Joost Jager committed 2019-12-11 00:17:08 +01:00
1 parent 74c2df658e
commit b6eb3a69ba
7 files changed
+633 -567

No files matched your search

+11
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,