| 237 | } |
| 238 | |
| 239 | static struct command_result *json_spamlistcommand(struct command *cmd, |
| 240 | const char *buf, |
| 241 | const jsmntok_t *params) |
| 242 | { |
| 243 | u64 *iterations; |
| 244 | struct request_batch *batch; |
| 245 | |
| 246 | if (!param(cmd, buf, params, |
| 247 | p_req("iterations", param_u64, &iterations), |
| 248 | NULL)) |
| 249 | return command_param_failed(); |
| 250 | |
| 251 | batch = request_batch_new(cmd, NULL, spam_errcb, spam_done, NULL); |
| 252 | for (size_t i = 0; i < *iterations; i++) { |
| 253 | struct out_req *req = add_to_batch(cmd, batch, "listinvoices"); |
| 254 | send_outreq(req); |
| 255 | } |
| 256 | return batch_done(cmd, batch); |
| 257 | } |
| 258 | |
| 259 | |
| 260 | static char *set_dynamic(struct command *cmd, |
nothing calls this directly
no test coverage detected