| 1293 | |
| 1294 | |
| 1295 | static struct command_result * |
| 1296 | param_policy_mod(struct command *cmd, const char *name, |
| 1297 | const char *buffer, const jsmntok_t *tok, |
| 1298 | u64 **mod) |
| 1299 | { |
| 1300 | struct amount_sat sats; |
| 1301 | char *arg_str, *err; |
| 1302 | |
| 1303 | *mod = tal(cmd, u64); |
| 1304 | arg_str = tal_strndup(cmd, buffer + tok->start, |
| 1305 | tok->end - tok->start); |
| 1306 | |
| 1307 | err = u64_option(cmd, arg_str, false, *mod); |
| 1308 | if (err) { |
| 1309 | tal_free(err); |
| 1310 | if (!parse_amount_sat(&sats, arg_str, strlen(arg_str))) |
| 1311 | return command_fail_badparam(cmd, name, |
| 1312 | buffer, tok, err); |
| 1313 | |
| 1314 | **mod = sats.satoshis; /* Raw: convert to u64 */ |
| 1315 | } |
| 1316 | |
| 1317 | return NULL; |
| 1318 | } |
| 1319 | |
| 1320 | static struct command_result * |
| 1321 | parse_lease_rates(struct command *cmd, const char *buffer, |
nothing calls this directly
no test coverage detected