| 836 | |
| 837 | |
| 838 | static struct command_result * |
| 839 | param_policy_mod(struct command *cmd, const char *name, |
| 840 | const char *buffer, const jsmntok_t *tok, |
| 841 | u64 **mod) |
| 842 | { |
| 843 | struct amount_sat sats; |
| 844 | char *arg_str, *err; |
| 845 | |
| 846 | *mod = tal(cmd, u64); |
| 847 | arg_str = tal_strndup(cmd, buffer + tok->start, |
| 848 | tok->end - tok->start); |
| 849 | |
| 850 | err = u64_option(arg_str, *mod); |
| 851 | if (err) { |
| 852 | tal_free(err); |
| 853 | if (!parse_amount_sat(&sats, arg_str, strlen(arg_str))) |
| 854 | return command_fail_badparam(cmd, name, |
| 855 | buffer, tok, err); |
| 856 | |
| 857 | **mod = sats.satoshis; /* Raw: convert to u64 */ |
| 858 | } |
| 859 | |
| 860 | return NULL; |
| 861 | } |
| 862 | |
| 863 | static struct command_result * |
| 864 | parse_lease_rates(struct command *cmd, const char *buffer, |
nothing calls this directly
no test coverage detected