| 3400 | }; |
| 3401 | |
| 3402 | static void openchannel_init_after_sync(struct chain_topology *topo, |
| 3403 | struct openchannel_init_info *info) |
| 3404 | { |
| 3405 | struct peer *peer; |
| 3406 | |
| 3407 | /* Look up peer again in case it's gone! */ |
| 3408 | peer = peer_by_id(info->cmd->ld, info->id); |
| 3409 | if (!peer) { |
| 3410 | was_pending(command_fail(info->cmd, FUNDING_UNKNOWN_PEER, "Unknown peer")); |
| 3411 | return; |
| 3412 | } |
| 3413 | |
| 3414 | if (!feature_negotiated(info->cmd->ld->our_features, |
| 3415 | peer->their_features, |
| 3416 | OPT_DUAL_FUND)) { |
| 3417 | was_pending(command_fail(info->cmd, FUNDING_V2_NOT_SUPPORTED, |
| 3418 | "v2 openchannel not supported " |
| 3419 | "by peer")); |
| 3420 | return; |
| 3421 | } |
| 3422 | |
| 3423 | openchannel_init(info->cmd, peer, |
| 3424 | *info->amount, |
| 3425 | *info->request_amt, |
| 3426 | info->psbt, |
| 3427 | *info->feerate_per_kw_funding, *info->feerate_per_kw, |
| 3428 | info->our_upfront_shutdown_script, |
| 3429 | *info->announce_channel, |
| 3430 | info->rates, info->ctype); |
| 3431 | } |
| 3432 | |
| 3433 | static struct command_result *json_openchannel_init(struct command *cmd, |
| 3434 | const char *buffer, |
nothing calls this directly
no test coverage detected