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

Function json_to_listpeers_channels

plugins/libplugin.c:2572–2591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2570}
2571
2572struct listpeers_channel **json_to_listpeers_channels(const tal_t *ctx,
2573 const char *buffer,
2574 const jsmntok_t *tok)
2575{
2576 size_t i;
2577 const jsmntok_t *iter;
2578 const jsmntok_t *channelstok = json_get_member(buffer, tok, "channels");
2579 struct listpeers_channel **chans;
2580
2581 chans = tal_arr(ctx, struct listpeers_channel *, 0);
2582 json_for_each_arr(i, iter, channelstok) {
2583 struct listpeers_channel *chan;
2584
2585 chan = json_to_listpeers_channel(chans, buffer, iter);
2586 if (!chan)
2587 continue;
2588 tal_arr_expand(&chans, chan);
2589 }
2590 return chans;
2591}
2592
2593struct createonion_response *json_to_createonion_response(const tal_t *ctx,
2594 const char *buffer,

Calls 2

json_get_memberFunction · 0.85

Tested by

no test coverage detected