| 1095 | } |
| 1096 | |
| 1097 | static struct command_result *param_preimage(struct command *cmd, |
| 1098 | const char *name, |
| 1099 | const char *buffer, |
| 1100 | const jsmntok_t *tok, |
| 1101 | struct preimage **preimage) |
| 1102 | { |
| 1103 | *preimage = tal(cmd, struct preimage); |
| 1104 | if (!hex_decode(buffer + tok->start, tok->end - tok->start, |
| 1105 | *preimage, sizeof(**preimage))) |
| 1106 | return command_fail_badparam(cmd, "preimage", |
| 1107 | buffer, tok, |
| 1108 | "should be 64 hex digits"); |
| 1109 | return NULL; |
| 1110 | } |
| 1111 | |
| 1112 | static struct command_result *json_invoice(struct command *cmd, |
| 1113 | const char *buffer, |
nothing calls this directly
no test coverage detected