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

Function json_spamlistcommand

tests/plugins/test_libplugin.c:239–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239static 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
260static char *set_dynamic(struct command *cmd,

Callers

nothing calls this directly

Calls 5

add_to_batchFunction · 0.85
batch_doneFunction · 0.85
paramFunction · 0.50
command_param_failedFunction · 0.50
send_outreqFunction · 0.50

Tested by

no test coverage detected