All fundchannel_start/openchannel_init commands have returned * with either success or failure. */
| 957 | * with either success or failure. |
| 958 | */ |
| 959 | struct command_result * |
| 960 | after_channel_start(struct multifundchannel_command *mfc) |
| 961 | { |
| 962 | unsigned int i; |
| 963 | |
| 964 | plugin_log(mfc->cmd->plugin, LOG_DBG, |
| 965 | "mfc %"PRIu64": parallel channel starts done.", |
| 966 | mfc->id); |
| 967 | |
| 968 | /* Check if any channel start failed. */ |
| 969 | for (i = 0; i < tal_count(mfc->destinations); ++i) { |
| 970 | struct multifundchannel_destination *dest; |
| 971 | |
| 972 | dest = &mfc->destinations[i]; |
| 973 | |
| 974 | assert(dest->state == MULTIFUNDCHANNEL_STARTED |
| 975 | || dest->state == MULTIFUNDCHANNEL_FAILED); |
| 976 | |
| 977 | if (dest->state != MULTIFUNDCHANNEL_FAILED) |
| 978 | continue; |
| 979 | |
| 980 | /* One of them failed, oh no. */ |
| 981 | return redo_multifundchannel(mfc, |
| 982 | is_v2(dest) ? |
| 983 | "openchannel_init" : |
| 984 | "fundchannel_start", |
| 985 | dest->error_message); |
| 986 | } |
| 987 | |
| 988 | /* Next step. */ |
| 989 | return perform_funding_tx_finalize(mfc); |
| 990 | } |
| 991 | |
| 992 | static struct command_result * |
| 993 | fundchannel_start_done(struct multifundchannel_destination *dest) |
no test coverage detected