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

Function param_sha256

common/json_param.c:538–550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536}
537
538struct command_result *param_sha256(struct command *cmd, const char *name,
539 const char *buffer, const jsmntok_t *tok,
540 struct sha256 **hash)
541{
542 *hash = tal(cmd, struct sha256);
543 if (hex_decode(buffer + tok->start,
544 tok->end - tok->start,
545 *hash, sizeof(**hash)))
546 return NULL;
547
548 return command_fail_badparam(cmd, name, buffer, tok,
549 "should be a 32 byte hex value");
550}
551
552struct command_result *param_u16(struct command *cmd, const char *name,
553 const char *buffer, const jsmntok_t *tok,

Callers

nothing calls this directly

Calls 2

hex_decodeFunction · 0.85
command_fail_badparamFunction · 0.70

Tested by

no test coverage detected