From 0f5aab2b3c4f78f26e895cd1c50507701bf96f60 Mon Sep 17 00:00:00 2001 From: Michael Schmoock Date: Tue, 22 Jun 2021 15:42:39 +0200 Subject: [PATCH] doc: listchannels filter by destination --- doc/lightning-listchannels.7 | 15 ++++++++++----- doc/lightning-listchannels.7.md | 12 ++++++++---- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/doc/lightning-listchannels.7 b/doc/lightning-listchannels.7 index 98927e255..719d09beb 100644 --- a/doc/lightning-listchannels.7 +++ b/doc/lightning-listchannels.7 @@ -3,7 +3,7 @@ lightning-listchannels - Command to query active lightning channels in the entire network .SH SYNOPSIS -\fBlistchannels\fR [\fIshort_channel_id\fR] [\fIsource\fR] +\fBlistchannels\fR [\fIshort_channel_id\fR] [\fIsource\fR] [\fIdestination\fR] .SH DESCRIPTION @@ -20,7 +20,12 @@ If \fIsource\fR is a node id, then only channels leading from that node id are returned\. -If neither is supplied, data on all lightning channels known to this +If \fIdestination\fR is a node id, then only channels leading to that node id +are returned\. + + +Only one of \fIshort_channgel_id\fR, \fIsource\fR or \fIdestination\fR can be supplied\. +If nothing is supplied, data on all lightning channels known to this node, are returned\. These can be local channels or public channels broadcast on the gossip network\. @@ -60,8 +65,8 @@ On success, an object containing \fBchannels\fR is returned\. It is an array of .RE -If \fIshort_channel_id\fR or \fIsource\fR is supplied and no matching channels -are found, a "channels" object with an empty list is returned\. +If one of \fIshort_channel_id\fR, \fIsource\fR or \fIdestination\fR is supplied and no +matching channels are found, a "channels" object with an empty list is returned\. On error the returned object will contain \fBcode\fR and \fBmessage\fR properties, @@ -93,4 +98,4 @@ BOLT #7: \fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md\fR .RE -\" SHA256STAMP:e228d4a2553ac8fc052fd0c3acfac32cdce6f0cfd37f1bb238a87de2fa99e553 +\" SHA256STAMP:b53e67e29b3ac9efe5157e8656ea5af5b2e418559655cc6f39fa99875f52bdc0 diff --git a/doc/lightning-listchannels.7.md b/doc/lightning-listchannels.7.md index 3b4835d44..0d28bc7d1 100644 --- a/doc/lightning-listchannels.7.md +++ b/doc/lightning-listchannels.7.md @@ -4,7 +4,7 @@ lightning-listchannels -- Command to query active lightning channels in the enti SYNOPSIS -------- -**listchannels** \[*short\_channel\_id*\] \[*source*\] +**listchannels** \[*short\_channel\_id*\] \[*source*\] \[*destination*\] DESCRIPTION ----------- @@ -19,7 +19,11 @@ matching *short\_channel\_id* are returned. Otherwise, it must be null. If *source* is a node id, then only channels leading from that node id are returned. -If neither is supplied, data on all lightning channels known to this +If *destination* is a node id, then only channels leading to that node id +are returned. + +Only one of *short\_channgel\_id*, *source* or *destination* can be supplied. +If nothing is supplied, data on all lightning channels known to this node, are returned. These can be local channels or public channels broadcast on the gossip network. @@ -44,8 +48,8 @@ On success, an object containing **channels** is returned. It is an array of ob - **htlc_maximum_msat** (msat, optional): The largest payment *source* will allow via this channel [comment]: # (GENERATE-FROM-SCHEMA-END) -If *short\_channel\_id* or *source* is supplied and no matching channels -are found, a "channels" object with an empty list is returned. +If one of *short\_channel\_id*, *source* or *destination* is supplied and no +matching channels are found, a "channels" object with an empty list is returned. On error the returned object will contain `code` and `message` properties, with `code` being one of the following: