| 2562 | } |
| 2563 | |
| 2564 | static struct command_result *init_set_feerate(struct command *cmd, |
| 2565 | u32 **feerate_per_kw, |
| 2566 | u32 **feerate_per_kw_funding) |
| 2567 | |
| 2568 | { |
| 2569 | if (!*feerate_per_kw_funding) { |
| 2570 | *feerate_per_kw_funding = tal(cmd, u32); |
| 2571 | **feerate_per_kw_funding = opening_feerate(cmd->ld->topology); |
| 2572 | if (!**feerate_per_kw_funding) |
| 2573 | return command_fail(cmd, LIGHTNINGD, |
| 2574 | "`funding_feerate` not specified and fee " |
| 2575 | "estimation failed"); |
| 2576 | } |
| 2577 | if (!*feerate_per_kw) { |
| 2578 | *feerate_per_kw = tal(cmd, u32); |
| 2579 | /* FIXME: Anchors are on by default, we should use the lowest |
| 2580 | * possible feerate */ |
| 2581 | **feerate_per_kw = **feerate_per_kw_funding; |
| 2582 | } |
| 2583 | |
| 2584 | return NULL; |
| 2585 | } |
| 2586 | |
| 2587 | static struct command_result *json_openchannel_init(struct command *cmd, |
| 2588 | const char *buffer, |
no test coverage detected