| 1666 | } |
| 1667 | |
| 1668 | static char *option_lease_fee_base(struct command *cmd, const char *arg, |
| 1669 | bool check_only, |
| 1670 | struct funder_policy *policy) |
| 1671 | { |
| 1672 | struct amount_sat amt; |
| 1673 | u32 lfbs; |
| 1674 | char *err; |
| 1675 | |
| 1676 | err = amount_option(cmd, arg, false, &amt); |
| 1677 | if (err) |
| 1678 | return err; |
| 1679 | |
| 1680 | if (!assign_overflow_u32(&lfbs, amt.satoshis)) /* Raw: conversion */ |
| 1681 | return tal_fmt(tmpctx, "lease_fee_base_sat overflowed"); |
| 1682 | |
| 1683 | if (!check_only) { |
| 1684 | if (!policy->rates) |
| 1685 | policy->rates = default_lease_rates(policy); |
| 1686 | |
| 1687 | policy->rates->lease_fee_base_sat = lfbs; |
| 1688 | } |
| 1689 | |
| 1690 | return NULL; |
| 1691 | } |
| 1692 | |
| 1693 | static char *option_lease_fee_basis(struct command *cmd, const char *arg, |
| 1694 | bool check_only, |
nothing calls this directly
no test coverage detected