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

Function listforwardings_add_forwardings

lightningd/peer_htlcs.c:2879–2897  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2877}
2878
2879static void listforwardings_add_forwardings(struct json_stream *response,
2880 struct wallet *wallet,
2881 enum forward_status status,
2882 const struct short_channel_id *chan_in,
2883 const struct short_channel_id *chan_out)
2884{
2885 const struct forwarding *forwardings;
2886
2887 forwardings = wallet_forwarded_payments_get(wallet, tmpctx, status, chan_in, chan_out);
2888
2889 json_array_start(response, "forwards");
2890 for (size_t i=0; i<tal_count(forwardings); i++) {
2891 const struct forwarding *cur = &forwardings[i];
2892 json_add_forwarding_object(response, NULL, cur, NULL);
2893 }
2894 json_array_end(response);
2895
2896 tal_free(forwardings);
2897}
2898
2899static struct command_result *param_forward_status(struct command *cmd,
2900 const char *name,

Callers 1

json_listforwardsFunction · 0.85

Calls 5

tal_freeFunction · 0.85
json_array_startFunction · 0.50
json_array_endFunction · 0.50

Tested by

no test coverage detected