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

Function json_add_peerchannels

lightningd/peer_control.c:2739–2752  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2737AUTODATA(json_command, &staticbackup_command);
2738
2739static void json_add_peerchannels(struct command *cmd,
2740 struct json_stream *response,
2741 const struct peer *peer)
2742{
2743 struct channel *channel;
2744
2745 json_add_uncommitted_channel(cmd, response, peer->uncommitted_channel, peer);
2746 list_for_each(&peer->channels, channel, list) {
2747 if (channel_state_uncommitted(channel->state))
2748 json_add_unsaved_channel(cmd, response, channel, peer);
2749 else
2750 json_add_channel(cmd, response, NULL, channel, peer);
2751 }
2752}
2753
2754static struct command_result *json_listpeerchannels(struct command *cmd,
2755 const char *buffer,

Callers 1

json_listpeerchannelsFunction · 0.85

Calls 3

json_add_unsaved_channelFunction · 0.70

Tested by

no test coverage detected