| 1033 | } |
| 1034 | |
| 1035 | static struct command_result *param_positive_msat_or_any(struct command *cmd, |
| 1036 | const char *name, |
| 1037 | const char *buffer, |
| 1038 | const jsmntok_t *tok, |
| 1039 | struct amount_msat **msat) |
| 1040 | { |
| 1041 | if (json_tok_streq(buffer, tok, "any")) { |
| 1042 | *msat = NULL; |
| 1043 | return NULL; |
| 1044 | } |
| 1045 | *msat = tal(cmd, struct amount_msat); |
| 1046 | if (parse_amount_msat(*msat, buffer + tok->start, tok->end - tok->start) |
| 1047 | && !amount_msat_is_zero(**msat)) |
| 1048 | return NULL; |
| 1049 | |
| 1050 | return command_fail_badparam(cmd, name, buffer, tok, |
| 1051 | "should be positive msat or 'any'"); |
| 1052 | } |
| 1053 | |
| 1054 | static struct command_result *param_chanhints(struct command *cmd, |
| 1055 | const char *name, |
nothing calls this directly
no test coverage detected