pyln: rpc support for listchannels by destination

This commit is contained in:
Michael Schmoock 2021-06-22 15:41:54 +02:00 committed by neil saitug
parent fc238bc61c
commit 89c45b379a
1 changed files with 5 additions and 3 deletions

View File

@ -844,13 +844,15 @@ class LightningRpc(UnixDomainSocketRpc):
} }
return self.call("invoice", payload) return self.call("invoice", payload)
def listchannels(self, short_channel_id=None, source=None): def listchannels(self, short_channel_id=None, source=None, destination=None):
""" """
Show all known channels, accept optional {short_channel_id} or {source}. Show all known channels or filter by optional
{short_channel_id}, {source} or {destination}.
""" """
payload = { payload = {
"short_channel_id": short_channel_id, "short_channel_id": short_channel_id,
"source": source "source": source,
"destination": destination
} }
return self.call("listchannels", payload) return self.call("listchannels", payload)