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

Function connect_direct

plugins/establish_onion_path.c:45–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45static struct command_result *connect_direct(struct command *cmd,
46 struct connect_info *ci)
47{
48 struct out_req *req;
49
50 if (ci->connect_disable) {
51 return ci->fail(cmd, "fetchinvoice-noconnect set: not initiating a new connection",
52 ci->arg);
53 }
54 plugin_log(cmd->plugin, LOG_DBG, "connecting directly to %s",
55 fmt_pubkey(tmpctx, &ci->dst));
56
57 req = jsonrpc_request_start(cmd,
58 "connect", connect_ok, command_failed, ci);
59 json_add_pubkey(req->js, "id", &ci->dst);
60 return send_outreq(req);
61}
62
63static bool can_carry_onionmsg(const struct gossmap *map,
64 const struct gossmap_chan *c,

Callers 1

listpeers_doneFunction · 0.85

Calls 5

fmt_pubkeyFunction · 0.85
json_add_pubkeyFunction · 0.85
failMethod · 0.80
plugin_logFunction · 0.70
send_outreqFunction · 0.70

Tested by

no test coverage detected