MCPcopy Create free account
hub / github.com/ElementsProject/lightning / after_channel_start

Function after_channel_start

plugins/spender/multifundchannel.c:959–990  ·  view source on GitHub ↗

All fundchannel_start/openchannel_init commands have returned * with either success or failure. */

Source from the content-addressed store, hash-verified

957 * with either success or failure.
958*/
959struct command_result *
960after_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
992static struct command_result *
993fundchannel_start_done(struct multifundchannel_destination *dest)

Callers 2

fundchannel_start_doneFunction · 0.85
openchannel_init_doneFunction · 0.85

Calls 4

redo_multifundchannelFunction · 0.85
is_v2Function · 0.85
plugin_logFunction · 0.50

Tested by

no test coverage detected