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

Function connect_dest

plugins/spender/multifundchannel.c:1607–1633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1605}
1606
1607static void
1608connect_dest(struct multifundchannel_destination *dest)
1609{
1610 struct multifundchannel_command *mfc = dest->mfc;
1611 struct command *cmd = mfc->cmd;
1612 const char *id;
1613 struct out_req *req;
1614
1615 id = fmt_node_id(tmpctx, &dest->id);
1616 plugin_log(mfc->cmd->plugin, LOG_DBG,
1617 "mfc %"PRIu64", dest %u: connect %s.",
1618 mfc->id, dest->index, id);
1619
1620 req = jsonrpc_request_start(cmd,
1621 "connect",
1622 &connect_ok,
1623 &connect_err,
1624 dest);
1625 if (dest->addrhint)
1626 json_add_string(req->js, "id",
1627 tal_fmt(tmpctx, "%s@%s",
1628 id,
1629 dest->addrhint));
1630 else
1631 json_add_node_id(req->js, "id", &dest->id);
1632 send_outreq(req);
1633}
1634
1635/*-----------------------------------------------------------------------------
1636Starting

Callers 1

perform_multiconnectFunction · 0.85

Calls 5

fmt_node_idFunction · 0.85
json_add_node_idFunction · 0.85
plugin_logFunction · 0.50
json_add_stringFunction · 0.50
send_outreqFunction · 0.50

Tested by

no test coverage detected