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

Function param_opt_config

lightningd/configs.c:211–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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