MCPcopy Create free account
hub / github.com/ElementsProject/lightning / json_add_peerchannels

Function json_add_peerchannels

lightningd/peer_control.c:3013–3026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3011AUTODATA(json_command, &staticbackup_command);
3012
3013static void json_add_peerchannels(struct command *cmd,
3014 struct json_stream *response,
3015 const struct peer *peer)
3016{
3017 struct channel *channel;
3018
3019 json_add_uncommitted_channel(cmd, response, peer->uncommitted_channel, peer);
3020 list_for_each(&peer->channels, channel, list) {
3021 if (channel_state_uncommitted(channel->state))
3022 json_add_unsaved_channel(cmd, response, channel, peer);
3023 else
3024 json_add_channel(cmd, response, NULL, channel, peer);
3025 }
3026}
3027
3028static struct command_result *json_listpeerchannels(struct command *cmd,
3029 const char *buffer,

Callers 1

json_listpeerchannelsFunction · 0.85

Calls 3

json_add_unsaved_channelFunction · 0.70

Tested by

no test coverage detected