~ Finally with everything set up correctly we `signpsbt`+`sendpsbt` the funding transaction. */
| 677 | funding transaction. |
| 678 | */ |
| 679 | static struct command_result * |
| 680 | after_fundchannel_complete(struct multifundchannel_command *mfc) |
| 681 | { |
| 682 | unsigned int i; |
| 683 | |
| 684 | plugin_log(mfc->cmd->plugin, LOG_DBG, |
| 685 | "mfc %"PRIu64": parallel fundchannel_complete done.", |
| 686 | mfc->id); |
| 687 | |
| 688 | /* Check if any fundchannel_complete failed. */ |
| 689 | for (i = 0; i < tal_count(mfc->destinations); ++i) { |
| 690 | struct multifundchannel_destination *dest; |
| 691 | |
| 692 | dest = &mfc->destinations[i]; |
| 693 | if (is_v2(dest)) |
| 694 | continue; |
| 695 | |
| 696 | assert(dest->state == MULTIFUNDCHANNEL_COMPLETED |
| 697 | || dest->state == MULTIFUNDCHANNEL_FAILED); |
| 698 | |
| 699 | if (dest->state != MULTIFUNDCHANNEL_FAILED) |
| 700 | continue; |
| 701 | |
| 702 | /* One of them failed, oh no. */ |
| 703 | return redo_multifundchannel(mfc, "fundchannel_complete", |
| 704 | dest->error_message); |
| 705 | } |
| 706 | |
| 707 | if (dest_count(mfc, OPEN_CHANNEL) > 0) |
| 708 | return check_sigs_ready(mfc); |
| 709 | |
| 710 | return perform_signpsbt(mfc); |
| 711 | } |
| 712 | |
| 713 | |
| 714 | static struct command_result * |
no test coverage detected