| 1625 | } |
| 1626 | |
| 1627 | static char *option_lease_fee_base(struct command *cmd, const char *arg, |
| 1628 | bool check_only, |
| 1629 | struct funder_policy *policy) |
| 1630 | { |
| 1631 | struct amount_sat amt; |
| 1632 | u32 lfbs; |
| 1633 | char *err; |
| 1634 | |
| 1635 | err = amount_option(cmd, arg, false, &amt); |
| 1636 | if (err) |
| 1637 | return err; |
| 1638 | |
| 1639 | if (!assign_overflow_u32(&lfbs, amt.satoshis)) /* Raw: conversion */ |
| 1640 | return tal_fmt(tmpctx, "lease_fee_base_sat overflowed"); |
| 1641 | |
| 1642 | if (!check_only) { |
| 1643 | if (!policy->rates) |
| 1644 | policy->rates = default_lease_rates(policy); |
| 1645 | |
| 1646 | policy->rates->lease_fee_base_sat = lfbs; |
| 1647 | } |
| 1648 | |
| 1649 | return NULL; |
| 1650 | } |
| 1651 | |
| 1652 | static char *option_lease_fee_basis(struct command *cmd, const char *arg, |
| 1653 | bool check_only, |
nothing calls this directly
no test coverage detected