| 474 | } |
| 475 | |
| 476 | static void opening_fundee_finished(struct subd *openingd, |
| 477 | const u8 *reply, |
| 478 | const int *fds, |
| 479 | struct uncommitted_channel *uc) |
| 480 | { |
| 481 | const u8 *fwd_msg; |
| 482 | struct channel_info channel_info; |
| 483 | struct bitcoin_signature remote_commit_sig; |
| 484 | struct bitcoin_tx *remote_commit; |
| 485 | struct channel_id cid; |
| 486 | struct lightningd *ld = openingd->ld; |
| 487 | struct bitcoin_outpoint funding; |
| 488 | struct amount_sat funding_sats; |
| 489 | struct amount_msat push; |
| 490 | u32 feerate; |
| 491 | u8 channel_flags; |
| 492 | struct channel *channel; |
| 493 | u8 *remote_upfront_shutdown_script, *local_upfront_shutdown_script; |
| 494 | struct peer_fd *peer_fd; |
| 495 | struct penalty_base *pbase; |
| 496 | struct channel_type *type; |
| 497 | |
| 498 | log_debug(uc->log, "Got opening_fundee_finish_response"); |
| 499 | |
| 500 | /* This is a new channel_info.their_config, set its ID to 0 */ |
| 501 | channel_info.their_config.id = 0; |
| 502 | |
| 503 | peer_fd = new_peer_fd_arr(tmpctx, fds); |
| 504 | if (!fromwire_openingd_fundee(tmpctx, reply, |
| 505 | &channel_info.their_config, |
| 506 | &remote_commit, |
| 507 | &pbase, |
| 508 | &remote_commit_sig, |
| 509 | &channel_info.theirbase.revocation, |
| 510 | &channel_info.theirbase.payment, |
| 511 | &channel_info.theirbase.htlc, |
| 512 | &channel_info.theirbase.delayed_payment, |
| 513 | &channel_info.remote_per_commit, |
| 514 | &channel_info.remote_fundingkey, |
| 515 | &funding, |
| 516 | &funding_sats, |
| 517 | &push, |
| 518 | &channel_flags, |
| 519 | &feerate, |
| 520 | cast_const2(u8 **, &fwd_msg), |
| 521 | &uc->our_config.channel_reserve, |
| 522 | &local_upfront_shutdown_script, |
| 523 | &remote_upfront_shutdown_script, |
| 524 | &type)) { |
| 525 | log_broken(uc->log, "bad OPENING_FUNDEE_REPLY %s", |
| 526 | tal_hex(reply, reply)); |
| 527 | uncommitted_channel_disconnect(uc, LOG_BROKEN, |
| 528 | "bad OPENING_FUNDEE_REPLY"); |
| 529 | goto failed; |
| 530 | } |
| 531 | |
| 532 | remote_commit->chainparams = chainparams; |
| 533 |
no test coverage detected