| 460 | } |
| 461 | |
| 462 | struct command_result *param_number(struct command *cmd, const char *name, |
| 463 | const char *buffer, const jsmntok_t *tok, |
| 464 | unsigned int **num) |
| 465 | { |
| 466 | *num = tal(cmd, unsigned int); |
| 467 | if (json_to_number(buffer, tok, *num)) |
| 468 | return NULL; |
| 469 | |
| 470 | return command_fail_badparam(cmd, name, buffer, tok, |
| 471 | "should be an integer"); |
| 472 | } |
| 473 | |
| 474 | struct command_result *param_sha256(struct command *cmd, const char *name, |
| 475 | const char *buffer, const jsmntok_t *tok, |
no test coverage detected