| 536 | } |
| 537 | |
| 538 | struct 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 | |
| 552 | struct command_result *param_u16(struct command *cmd, const char *name, |
| 553 | const char *buffer, const jsmntok_t *tok, |
nothing calls this directly
no test coverage detected