listchannels: allow source arg to list channels by their source node.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-01-15 14:39:27 +10:30
committed by Christian Decker
parent de682f5806
commit dc2ee9639b
8 changed files with 59 additions and 22 deletions

View File

@@ -167,12 +167,13 @@ class LightningRpc(UnixDomainSocketRpc):
}
return self.call("getroute", payload)
def listchannels(self, short_channel_id=None):
def listchannels(self, short_channel_id=None, source=None):
"""
Show all known channels, accept optional {short_channel_id}
Show all known channels, accept optional {short_channel_id} or {source}
"""
payload = {
"short_channel_id": short_channel_id
"short_channel_id": short_channel_id,
"source": source
}
return self.call("listchannels", payload)