setchannel: add minhtlc

Suggested by @m-schmook, I realized that if we append it later I'll
never get it right: I expect parameters min and max, not max and min!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Protocol: you can now alter the `htlc_minimum_msat` and `htlc_maximum_msat` your node advertizes.
This commit is contained in:
Rusty Russell
2022-03-21 11:28:54 +10:30
parent f29890ed66
commit 999c734bb5
20 changed files with 186 additions and 43 deletions

View File

@@ -1176,7 +1176,7 @@ class LightningRpc(UnixDomainSocketRpc):
}
return self.call("setchannelfee", payload)
def setchannel(self, id, feebase=None, feeppm=None, htlcmax=None, enforcedelay=None):
def setchannel(self, id, feebase=None, feeppm=None, htlcmin=None, htlcmax=None, enforcedelay=None):
"""Set configuration a channel/peer {id} (or 'all').
{feebase} is a value in millisatoshi that is added as base fee
@@ -1185,6 +1185,9 @@ class LightningRpc(UnixDomainSocketRpc):
{feeppm} is a value added proportionally per-millionths to any
routed payment volume in satoshi.
{htlcmin} is the minimum (outgoing) htlc amount to allow and
advertize.
{htlcmax} is the maximum (outgoing) htlc amount to allow and
advertize.
@@ -1196,6 +1199,7 @@ class LightningRpc(UnixDomainSocketRpc):
"id": id,
"feebase": feebase,
"feeppm": feeppm,
"htlcmin": htlcmin,
"htlcmax": htlcmax,
"enforcedelay": enforcedelay,
}