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

Function connect_dest

plugins/spender/multifundchannel.c:1659–1685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1657}
1658
1659static void
1660connect_dest(struct multifundchannel_destination *dest)
1661{
1662 struct multifundchannel_command *mfc = dest->mfc;
1663 struct command *cmd = mfc->cmd;
1664 const char *id;
1665 struct out_req *req;
1666
1667 id = node_id_to_hexstr(tmpctx, &dest->id);
1668 plugin_log(mfc->cmd->plugin, LOG_DBG,
1669 "mfc %"PRIu64", dest %u: connect %s.",
1670 mfc->id, dest->index, id);
1671
1672 req = jsonrpc_request_start(cmd->plugin, cmd,
1673 "connect",
1674 &connect_ok,
1675 &connect_err,
1676 dest);
1677 if (dest->addrhint)
1678 json_add_string(req->js, "id",
1679 tal_fmt(tmpctx, "%s@%s",
1680 id,
1681 dest->addrhint));
1682 else
1683 json_add_node_id(req->js, "id", &dest->id);
1684 send_outreq(cmd->plugin, req);
1685}
1686
1687/*-----------------------------------------------------------------------------
1688Starting

Callers 1

perform_multiconnectFunction · 0.85

Calls 5

node_id_to_hexstrFunction · 0.50
plugin_logFunction · 0.50
json_add_stringFunction · 0.50
json_add_node_idFunction · 0.50
send_outreqFunction · 0.50

Tested by

no test coverage detected