From 1e6626ff43a1cfe8012f110df9f60ee96760ca41 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Tue, 9 Mar 2021 10:20:13 +0100 Subject: [PATCH] pyln: Fix listfunds call defaulting to spent=False The semantics don't change, since `lightningd` will use false as default as well, however setting it to something other than `None` causes the RPC library to include the parameter in the query, and since the parameter was introduced only in 0.9.3 and pyln may be used with older versions this then results in an error about an unknown parameter. Setting this to `None` makes sure pyln filters out the argument before calling. Changelog-Fixed: pyln: Fixed an error when calling `listfunds` with an older c-lightning version causing an error about an unknown `spent` parameter --- contrib/pyln-client/pyln/client/lightning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/pyln-client/pyln/client/lightning.py b/contrib/pyln-client/pyln/client/lightning.py index fd705c3cd..c57aa2c9a 100644 --- a/contrib/pyln-client/pyln/client/lightning.py +++ b/contrib/pyln-client/pyln/client/lightning.py @@ -927,7 +927,7 @@ class LightningRpc(UnixDomainSocketRpc): } return self.call("listforwards", payload) - def listfunds(self, spent=False): + def listfunds(self, spent=None): """ Show funds available for opening channels or both unspent and spent funds if {spent} is True.