mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +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:
committed by
Rusty Russell
parent
7bde0ead4d
commit
d732fa9724
@@ -515,7 +515,8 @@ class LightningRpc(UnixDomainSocketRpc):
|
|||||||
payload.update({k: v for k, v in kwargs.items()})
|
payload.update({k: v for k, v in kwargs.items()})
|
||||||
return self.call("check", payload)
|
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 the channel with peer {id}, forcing a unilateral
|
||||||
close after {unilateraltimeout} seconds if non-zero, and
|
close after {unilateraltimeout} seconds if non-zero, and
|
||||||
|
|||||||
Reference in New Issue
Block a user