Return output idx for a funding tx in a channel information in listfunds

This commit is contained in:
Kristaps Kaupe 2019-07-25 22:48:36 +03:00 committed by ZmnSCPxj, ZmnSCPxj jxPCSmnZ
parent 2309951eda
commit d02496b89b
4 changed files with 40 additions and 18 deletions

View File

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Lightningd: add support for `signet` networks using the `--network=signet` or `--signet` startup option
- JSON API: `listfunds` now returns also `funding_output` for `channels`
### Changed

View File

@ -2,12 +2,12 @@
.\" Title: lightning-listfunds
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 05/09/2019
.\" Date: 07/25/2019
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "LIGHTNING\-LISTFUNDS" "7" "05/09/2019" "\ \&" "\ \&"
.TH "LIGHTNING\-LISTFUNDS" "7" "07/25/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -60,7 +60,8 @@ Each entry in \fIoutputs\fR will include:
.sp -1
.IP \(bu 2.3
.\}
\fIoutput\fR (the index of the output in the transaction)
\fIoutput\fR
(the index of the output in the transaction)
.RE
.sp
.RS 4
@ -71,21 +72,21 @@ Each entry in \fIoutputs\fR will include:
.sp -1
.IP \(bu 2.3
.\}
\fIvalue\fR (the output value in satoshis)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIamount_sat\fR
(the same as
\fIvalue\fR
, but in millisatoshis with
(the output value in satoshis)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIamount_msat\fR
(the same as
\fIvalue\fR, but in millisatoshi with
\fImsat\fR
appended)
.RE
@ -109,7 +110,11 @@ appended)
.sp -1
.IP \(bu 2.3
.\}
\fIstatus\fR (whether \fIunconfirmed\fR, \fIconfirmed\fR, or \fIspent\fR)
\fIstatus\fR
(whether
\fIunconfirmed\fR,
\fIconfirmed\fR, or
\fIspent\fR)
.RE
.sp
Each entry in \fIchannels\fR will include:
@ -201,6 +206,18 @@ appended\&.
\fIfunding_txid\fR
\- funding transaction id\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIfunding_output\fR
\- the index of the output in the funding transaction\&.
.RE
.SH "AUTHOR"
.sp
Felix <fixone@gmail\&.com> is mainly responsible\&.

View File

@ -55,6 +55,8 @@ number and output index of the channel funding transaction).
- 'funding_txid' - funding transaction id.
- 'funding_output' - the index of the output in the funding transaction.
AUTHOR
------
Felix <fixone@gmail.com> is mainly responsible.

View File

@ -657,6 +657,8 @@ static struct command_result *json_listfunds(struct command *cmd,
"amount_msat");
json_add_txid(response, "funding_txid",
&c->funding_txid);
json_add_num(response, "funding_output",
c->funding_outnum);
json_object_end(response);
}
}