| 2877 | } |
| 2878 | |
| 2879 | static 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 | |
| 2899 | static struct command_result *param_forward_status(struct command *cmd, |
| 2900 | const char *name, |
no test coverage detected