mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-11 11:32:46 +02:00
routing+lnrpc+lncli: allow setting min htlc policy
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user