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

Function perform_channel_start

plugins/spender/multifundchannel.c:1136–1160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1134}
1135
1136static struct command_result *
1137perform_channel_start(struct multifundchannel_command *mfc)
1138{
1139 unsigned int i;
1140
1141 plugin_log(mfc->cmd->plugin, LOG_DBG,
1142 "mfc %"PRIu64": fundchannel_start parallel "
1143 "with PSBT %s",
1144 mfc->id,
1145 type_to_string(tmpctx, struct wally_psbt, mfc->psbt));
1146
1147 mfc->pending = tal_count(mfc->destinations);
1148
1149 /* Since v2 is now available, we branch depending
1150 * on the capability of the peer and our feaures */
1151 for (i = 0; i < tal_count(mfc->destinations); ++i) {
1152 if (is_v2(&mfc->destinations[i]))
1153 openchannel_init_dest(&mfc->destinations[i]);
1154 else
1155 fundchannel_start_dest(&mfc->destinations[i]);
1156 }
1157
1158 assert(mfc->pending != 0);
1159 return command_still_pending(mfc->cmd);
1160}
1161
1162
1163/*---------------------------------------------------------------------------*/

Callers 1

mfc_psbt_acquiredFunction · 0.85

Calls 6

is_v2Function · 0.85
openchannel_init_destFunction · 0.85
fundchannel_start_destFunction · 0.85
plugin_logFunction · 0.50
type_to_stringClass · 0.50
command_still_pendingFunction · 0.50

Tested by

no test coverage detected