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

Function param_opt_config

lightningd/configs.c:212–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212static struct command_result *param_opt_config(struct command *cmd,
213 const char *name,
214 const char *buffer,
215 const jsmntok_t *tok,
216 const struct opt_table **config)
217{
218 const char *name0 = json_strdup(tmpctx, buffer, tok);
219 *config = opt_find_long(name0, NULL);
220 if (*config)
221 return NULL;
222
223 return command_fail_badparam(cmd, name, buffer, tok,
224 "Unknown config option");
225}
226
227/* FIXME: This is a hack! Expose somehow in ccan/opt.*/
228/* Returns string after first '-'. */

Callers 1

param_opt_dynamic_configFunction · 0.85

Calls 3

opt_find_longFunction · 0.85
json_strdupFunction · 0.50
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected