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

Function after_multiconnect

plugins/spender/multifundchannel.c:1501–1527  ·  view source on GitHub ↗

Check results of connect. */

Source from the content-addressed store, hash-verified

1499
1500/* Check results of connect. */
1501static struct command_result *
1502after_multiconnect(struct multifundchannel_command *mfc)
1503{
1504 unsigned int i;
1505
1506 plugin_log(mfc->cmd->plugin, LOG_DBG,
1507 "mfc %"PRIu64": multiconnect done.", mfc->id);
1508
1509 /* Check if anyone failed. */
1510 for (i = 0; i < tal_count(mfc->destinations); ++i) {
1511 struct multifundchannel_destination *dest;
1512
1513 dest = &mfc->destinations[i];
1514
1515 assert(dest->state == MULTIFUNDCHANNEL_CONNECTED
1516 || dest->state == MULTIFUNDCHANNEL_FAILED);
1517
1518 if (dest->state != MULTIFUNDCHANNEL_FAILED)
1519 continue;
1520
1521 /* One of them failed, oh no. */
1522 return redo_multifundchannel(mfc, "connect",
1523 dest->error_message);
1524 }
1525
1526 return getfeerate(mfc);
1527}
1528
1529static struct command_result *
1530connect_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