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

Function param_subsystem

lightningd/wait.c:214–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214static struct command_result *param_subsystem(struct command *cmd,
215 const char *name,
216 const char *buffer,
217 const jsmntok_t *tok,
218 enum wait_subsystem **subsystem)
219{
220 for (size_t i = 0; i < ARRAY_SIZE(subsystem_names); i++) {
221 if (json_tok_streq(buffer, tok, subsystem_names[i])) {
222 *subsystem = tal(cmd, enum wait_subsystem);
223 **subsystem = i;
224 return NULL;
225 }
226 }
227
228 return command_fail_badparam(cmd, name, buffer, tok,
229 "unknown subsystem");
230}
231
232struct command_result *param_index(struct command *cmd,
233 const char *name,

Callers

nothing calls this directly

Calls 2

json_tok_streqFunction · 0.85
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected