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

Function param_hsm_secret

lightningd/jsonrpc.c:243–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243static struct command_result *param_hsm_secret(struct command *cmd,
244 const char *name,
245 const char *buffer,
246 const jsmntok_t *tok,
247 const char **hsm_secret)
248{
249 char *err;
250 /* We parse here for sanity checking, but we just hand string to --recover */
251 const struct hsm_secret *hsms;
252
253 *hsm_secret = json_strdup(cmd, buffer, tok);
254 err = hsm_secret_arg(tmpctx, *hsm_secret, &hsms);
255 if (err)
256 return command_fail_badparam(cmd, name, buffer, tok, err);
257 return NULL;
258}
259
260/* We cannot --recover unless these files are not in place. */
261static void move_prerecover_files(const char *dir)

Callers

nothing calls this directly

Calls 3

hsm_secret_argFunction · 0.70
json_strdupFunction · 0.50
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected