| 220 | }; |
| 221 | |
| 222 | static struct command_result *param_rune(struct command *cmd, const char *name, |
| 223 | const char * buffer, const jsmntok_t *tok, |
| 224 | struct rune_and_string **rune_and_string) |
| 225 | { |
| 226 | u64 uid; |
| 227 | |
| 228 | *rune_and_string = tal(cmd, struct rune_and_string); |
| 229 | (*rune_and_string)->runestr = json_strdup(*rune_and_string, buffer, tok); |
| 230 | (*rune_and_string)->rune = rune_from_base64(cmd, (*rune_and_string)->runestr); |
| 231 | if (!(*rune_and_string)->rune) |
| 232 | return command_fail_badparam(cmd, name, buffer, tok, |
| 233 | "should be base64 string"); |
| 234 | /* We always create runes with integer unique ids: accept no less! */ |
| 235 | if (!unique_id_num((*rune_and_string)->rune, &uid)) |
| 236 | return command_fail_badparam(cmd, name, buffer, tok, |
| 237 | "should have valid numeric unique_id"); |
| 238 | |
| 239 | return NULL; |
| 240 | } |
| 241 | |
| 242 | static struct command_result *param_params(struct command *cmd, const char *name, |
| 243 | const char * buffer, const jsmntok_t *tok, |
nothing calls this directly
no test coverage detected