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

@@ -2,12 +2,12 @@
.\" Title: lightning-listchannels
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 01/08/2019
.\" Date: 01/09/2019
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "LIGHTNING\-LISTCHANN" "7" "01/08/2019" "\ \&" "\ \&"
.TH "LIGHTNING\-LISTCHANN" "7" "01/09/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -31,14 +31,16 @@
lightning-listchannels \- Command to query active lightning channels in the entire network\&.
.SH "SYNOPSIS"
.sp
\fBlistchannels\fR [\fIshort_channel_id\fR]
\fBlistchannels\fR [\fIshort_channel_id\fR] [\fIsource\fR]
.SH "DESCRIPTION"
.sp
The \fBlistchannels\fR RPC command returns data on channels that are known to the node\&. Because channels may be bidirectional, up to 2 objects will be returned for each channel (one for each direction)\&.
.sp
If no \fIshort_channel_id\fR is supplied, then data on all lightning channels known to this node, are returned\&. These can be local channels or public channels broadcast on the gossip network\&.
If \fIshort_channel_id\fR is supplied, then only known channels with a matching \fIshort_channel_id\fR are returned\&.
.sp
Supplying \fIshort_channel_id\fR will filter the results to only return data for known channels with a matching \fIshort_channel_id\fR\&.
If \fIsource\fR is supplied, then only channels leading from that node id are returned\&.
.sp
If neither 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\&.
.SH "RETURN VALUE"
.sp
On success, an object with a "channels" key is returned containing a list of 0 or more objects\&.
@@ -191,7 +193,7 @@ message (BOLT #7)\&.
: The number of blocks delay required to wait for on\-chain settlement when unilaterally closing the channel (BOLT #2)\&.
.RE
.sp
If \fIshort_channel_id\fR is supplied and no matching channels are found, a "channels" object with an empty list is returned\&.
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\&.
.SH "ERRORS"
.sp
If \fIshort_channel_id\fR is not a valid short_channel_id, an error message will be returned:
@@ -206,12 +208,14 @@ If \fIshort_channel_id\fR is not a valid short_channel_id, an error message will
.if n \{\
.RE
.\}
.sp
Similarly if \fIsource\fR is not a valid pubkey\&.
.SH "AUTHOR"
.sp
Michael Hawkins <michael\&.hawkins@protonmail\&.com>\&.
.SH "SEE ALSO"
.sp
lightning\-fundchannel(7)
lightning\-fundchannel(7), lightning\-listnodes(7)
.SH "RESOURCES"
.sp
Main web site: https://github\&.com/ElementsProject/lightning

View File

@@ -8,7 +8,7 @@ lightning-listchannels - Command to query active lightning channels in the entir
SYNOPSIS
--------
*listchannels* ['short_channel_id']
*listchannels* ['short_channel_id'] ['source']
DESCRIPTION
-----------
@@ -16,12 +16,15 @@ The *listchannels* RPC command returns data on channels that are known to the
node. Because channels may be bidirectional, up to 2 objects will be returned
for each channel (one for each direction).
If no 'short_channel_id' is supplied, then data on all lightning channels known
to this node, are returned. These can be local channels or public channels
broadcast on the gossip network.
If 'short_channel_id' is supplied, then only known channels with a
matching 'short_channel_id' are returned.
Supplying 'short_channel_id' will filter the results to only return data for
known channels with a matching 'short_channel_id'.
If 'source' is supplied, then only channels leading from that node id
are returned.
If neither 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.
RETURN VALUE
------------
@@ -56,8 +59,8 @@ transferred satoshi (BOLT #2).
- 'delay' : The number of blocks delay required to wait for on-chain settlement
when unilaterally closing the channel (BOLT #2).
If 'short_channel_id' is supplied and no matching channels are found, a
"channels" object with an empty list is returned.
If 'short_channel_id' or 'source' is supplied and no matching channels
are found, a "channels" object with an empty list is returned.
ERRORS
------
@@ -69,13 +72,15 @@ returned:
"message" : "'short_channel_id' should be a short channel id, not '...'" }
----
Similarly if 'source' is not a valid pubkey.
AUTHOR
------
Michael Hawkins <michael.hawkins@protonmail.com>.
SEE ALSO
--------
lightning-fundchannel(7)
lightning-fundchannel(7), lightning-listnodes(7)
RESOURCES
---------