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

Function after_multiconnect

plugins/spender/multifundchannel.c:1555–1581  ·  view source on GitHub ↗

Check results of connect. */

Source from the content-addressed store, hash-verified

1553
1554/* Check results of connect. */
1555static struct command_result *
1556after_multiconnect(struct multifundchannel_command *mfc)
1557{
1558 unsigned int i;
1559
1560 plugin_log(mfc->cmd->plugin, LOG_DBG,
1561 "mfc %"PRIu64": multiconnect done.", mfc->id);
1562
1563 /* Check if anyone failed. */
1564 for (i = 0; i < tal_count(mfc->destinations); ++i) {
1565 struct multifundchannel_destination *dest;
1566
1567 dest = &mfc->destinations[i];
1568
1569 assert(dest->state == MULTIFUNDCHANNEL_CONNECTED
1570 || dest->state == MULTIFUNDCHANNEL_FAILED);
1571
1572 if (dest->state != MULTIFUNDCHANNEL_FAILED)
1573 continue;
1574
1575 /* One of them failed, oh no. */
1576 return redo_multifundchannel(mfc, "connect",
1577 dest->error_message);
1578 }
1579
1580 return getfeerate(mfc);
1581}
1582
1583static struct command_result *
1584connect_done(struct multifundchannel_destination *dest)

Callers 1

connect_doneFunction · 0.85

Calls 3

redo_multifundchannelFunction · 0.85
getfeerateFunction · 0.70
plugin_logFunction · 0.50

Tested by

no test coverage detected