Skip to content

Commit

Permalink
Output channel_id in listfunds
Browse files Browse the repository at this point in the history
  • Loading branch information
kristapsk committed Feb 22, 2023
1 parent e315f30 commit 82cb615
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cln-rpc/src/model.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions doc/lightning-listfunds.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ On success, an object is returned, containing:
- **funding\_output** (u32): the 0-based index of the output in the funding transaction
- **connected** (boolean): whether the channel peer is connected
- **state** (string): the channel state, in particular "CHANNELD\_NORMAL" means the channel can be used normally (one of "OPENINGD", "CHANNELD\_AWAITING\_LOCKIN", "CHANNELD\_NORMAL", "CHANNELD\_SHUTTING\_DOWN", "CLOSINGD\_SIGEXCHANGE", "CLOSINGD\_COMPLETE", "AWAITING\_UNILATERAL", "FUNDING\_SPEND\_SEEN", "ONCHAIN", "DUALOPEND\_OPEN\_INIT", "DUALOPEND\_AWAITING\_LOCKIN")
- **channel_id** (hex): channel id of channel

If **state** is "CHANNELD\_NORMAL":

Expand Down
1 change: 1 addition & 0 deletions wallet/walletrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ static struct command_result *json_listfunds(struct command *cmd,
channel_is_connected(c));
json_add_string(response, "state",
channel_state_name(c));
json_add_channel_id(response, "channel_id", &c->cid);
if (c->scid)
json_add_short_channel_id(response,
"short_channel_id",
Expand Down

0 comments on commit 82cb615

Please sign in to comment.