| 144 | } |
| 145 | |
| 146 | static void listforwardings_add_forwardings(struct json_stream *response, |
| 147 | struct wallet *wallet, |
| 148 | enum forward_status status, |
| 149 | const struct short_channel_id *chan_in, |
| 150 | const struct short_channel_id *chan_out, |
| 151 | const enum wait_index *listindex, |
| 152 | u64 liststart, |
| 153 | const u32 *listlimit) |
| 154 | { |
| 155 | struct db_stmt *stmt; |
| 156 | |
| 157 | stmt = forwarding_first(wallet, status, chan_in, chan_out, listindex, liststart, listlimit); |
| 158 | |
| 159 | json_array_start(response, "forwards"); |
| 160 | while (stmt) { |
| 161 | const struct forwarding *cur = forwarding_details(tmpctx, wallet, stmt); |
| 162 | json_object_start(response, NULL); |
| 163 | json_add_forwarding_fields(response, cur, NULL, NULL); |
| 164 | json_object_end(response); |
| 165 | tal_free(cur); |
| 166 | stmt = forwarding_next(wallet, stmt); |
| 167 | } |
| 168 | json_array_end(response); |
| 169 | } |
| 170 | |
| 171 | static struct command_result *param_forward_status(struct command *cmd, |
| 172 | const char *name, |
no test coverage detected