| 3308 | } |
| 3309 | |
| 3310 | static struct command_result *init_set_feerate(struct command *cmd, |
| 3311 | u32 **feerate_per_kw, |
| 3312 | u32 **feerate_per_kw_funding) |
| 3313 | |
| 3314 | { |
| 3315 | if (!*feerate_per_kw_funding) { |
| 3316 | *feerate_per_kw_funding = tal(cmd, u32); |
| 3317 | **feerate_per_kw_funding = opening_feerate(cmd->ld->topology); |
| 3318 | if (!**feerate_per_kw_funding) |
| 3319 | return command_fail(cmd, LIGHTNINGD, |
| 3320 | "`funding_feerate` not specified and fee " |
| 3321 | "estimation failed"); |
| 3322 | } |
| 3323 | if (!*feerate_per_kw) { |
| 3324 | *feerate_per_kw = tal(cmd, u32); |
| 3325 | **feerate_per_kw = **feerate_per_kw_funding; |
| 3326 | } |
| 3327 | |
| 3328 | return NULL; |
| 3329 | } |
| 3330 | |
| 3331 | static struct command_result *openchannel_init(struct command *cmd, |
| 3332 | struct peer *peer, |
no test coverage detected