| 43 | } |
| 44 | |
| 45 | static 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 | |
| 63 | static bool can_carry_onionmsg(const struct gossmap *map, |
| 64 | const struct gossmap_chan *c, |
no test coverage detected