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

Function param_index

lightningd/wait.c:232–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232struct command_result *param_index(struct command *cmd,
233 const char *name,
234 const char *buffer,
235 const jsmntok_t *tok,
236 enum wait_index **index)
237{
238 for (size_t i = 0; i < ARRAY_SIZE(index_names); i++) {
239 if (json_tok_streq(buffer, tok, index_names[i])) {
240 *index = tal(cmd, enum wait_index);
241 **index = i;
242 return NULL;
243 }
244 }
245
246 return command_fail_badparam(cmd, name, buffer, tok,
247 "unknown index");
248}
249
250static struct command_result *json_wait(struct command *cmd,
251 const char *buffer,

Callers

nothing calls this directly

Calls 2

json_tok_streqFunction · 0.85
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected