| 3022 | } |
| 3023 | |
| 3024 | static struct command_result *init_set_feerate(struct command *cmd, |
| 3025 | u32 **feerate_per_kw, |
| 3026 | u32 **feerate_per_kw_funding) |
| 3027 | |
| 3028 | { |
| 3029 | if (!*feerate_per_kw_funding) { |
| 3030 | *feerate_per_kw_funding = tal(cmd, u32); |
| 3031 | **feerate_per_kw_funding = opening_feerate(cmd->ld->topology); |
| 3032 | if (!**feerate_per_kw_funding) |
| 3033 | return command_fail(cmd, LIGHTNINGD, |
| 3034 | "`funding_feerate` not specified and fee " |
| 3035 | "estimation failed"); |
| 3036 | } |
| 3037 | if (!*feerate_per_kw) { |
| 3038 | *feerate_per_kw = tal(cmd, u32); |
| 3039 | **feerate_per_kw = **feerate_per_kw_funding; |
| 3040 | } |
| 3041 | |
| 3042 | return NULL; |
| 3043 | } |
| 3044 | |
| 3045 | static struct command_result *openchannel_init(struct command *cmd, |
| 3046 | struct peer *peer, |
no test coverage detected