mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
lightningd: new setchannel command.
Based on setchannelfee, but expanded to allow setting max htlc amount (and others in future?). The main differences: 1. It doesn't change values which are not specified (that would be hard to add fields to!) 2. It says exactly what all values are in any potentially changed channels. Changelog-Added: JSON-RPC: new `setchannel` command generalizes `setchannelfee`. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1176,6 +1176,31 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
}
|
||||
return self.call("setchannelfee", payload)
|
||||
|
||||
def setchannel(self, id, feebase=None, feeppm=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
|
||||
to any routed payment.
|
||||
|
||||
{feeppm} is a value added proportionally per-millionths to any
|
||||
routed payment volume in satoshi.
|
||||
|
||||
{htlcmax} is the maximum (outgoing) htlc amount to allow and
|
||||
advertize.
|
||||
|
||||
{enforcedelay} is the number of seconds before enforcing this
|
||||
change.
|
||||
|
||||
"""
|
||||
payload = {
|
||||
"id": id,
|
||||
"feebase": feebase,
|
||||
"feeppm": feeppm,
|
||||
"htlcmax": htlcmax,
|
||||
"enforcedelay": enforcedelay,
|
||||
}
|
||||
return self.call("setchannel", payload)
|
||||
|
||||
def stop(self):
|
||||
"""
|
||||
Shut down the lightningd process.
|
||||
|
||||
Reference in New Issue
Block a user