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

Function json_to_listpeers_channels

plugins/libplugin.c:2562–2581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2560}
2561
2562struct listpeers_channel **json_to_listpeers_channels(const tal_t *ctx,
2563 const char *buffer,
2564 const jsmntok_t *tok)
2565{
2566 size_t i;
2567 const jsmntok_t *iter;
2568 const jsmntok_t *channelstok = json_get_member(buffer, tok, "channels");
2569 struct listpeers_channel **chans;
2570
2571 chans = tal_arr(ctx, struct listpeers_channel *, 0);
2572 json_for_each_arr(i, iter, channelstok) {
2573 struct listpeers_channel *chan;
2574
2575 chan = json_to_listpeers_channel(chans, buffer, iter);
2576 if (!chan)
2577 continue;
2578 tal_arr_expand(&chans, chan);
2579 }
2580 return chans;
2581}
2582
2583struct createonion_response *json_to_createonion_response(const tal_t *ctx,
2584 const char *buffer,

Calls 2

json_get_memberFunction · 0.85

Tested by

no test coverage detected