| 1008 | #endif /* DEVELOPER */ |
| 1009 | |
| 1010 | static struct command_result *param_positive_msat_or_any(struct command *cmd, |
| 1011 | const char *name, |
| 1012 | const char *buffer, |
| 1013 | const jsmntok_t *tok, |
| 1014 | struct amount_msat **msat) |
| 1015 | { |
| 1016 | if (json_tok_streq(buffer, tok, "any")) { |
| 1017 | *msat = NULL; |
| 1018 | return NULL; |
| 1019 | } |
| 1020 | *msat = tal(cmd, struct amount_msat); |
| 1021 | if (parse_amount_msat(*msat, buffer + tok->start, tok->end - tok->start) |
| 1022 | && !amount_msat_eq(**msat, AMOUNT_MSAT(0))) |
| 1023 | return NULL; |
| 1024 | |
| 1025 | return command_fail_badparam(cmd, name, buffer, tok, |
| 1026 | "should be positive msat or 'any'"); |
| 1027 | } |
| 1028 | |
| 1029 | /* Parse time with optional suffix, return seconds */ |
| 1030 | static struct command_result *param_time(struct command *cmd, const char *name, |
nothing calls this directly
no test coverage detected