mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
pyln: Fix backward compat issue in LightningRpc.close
The issue is that the new keyword `force_lease_closed` was being set even if the user didn't specify it, which results in breakage if this new pyln version talks to older c-lightning nodes that don't have this keyword yet. By setting the default to `None` it gets filtered out if the user has not explicitly set it, but still retains the `True` / `False` values if they did. Changelog-None Issue is not present in released versions
This commit is contained in:
parent
7bde0ead4d
commit
d732fa9724
@ -515,7 +515,8 @@ class LightningRpc(UnixDomainSocketRpc):
|
||||
payload.update({k: v for k, v in kwargs.items()})
|
||||
return self.call("check", payload)
|
||||
|
||||
def close(self, peer_id, unilateraltimeout=None, destination=None, fee_negotiation_step=None, force_lease_closed=False):
|
||||
def close(self, peer_id, unilateraltimeout=None, destination=None,
|
||||
fee_negotiation_step=None, force_lease_closed=None):
|
||||
"""
|
||||
Close the channel with peer {id}, forcing a unilateral
|
||||
close after {unilateraltimeout} seconds if non-zero, and
|
||||
|
Loading…
Reference in New Issue
Block a user