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

Function connect_cmd_succeed

lightningd/connect_control.c:61–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61static struct command_result *connect_cmd_succeed(struct command *cmd,
62 const struct peer *peer,
63 bool incoming,
64 const struct wireaddr_internal *addr)
65{
66 struct json_stream *response = json_stream_success(cmd);
67 json_add_node_id(response, "id", &peer->id);
68 json_add_hex_talarr(response, "features", peer->their_features);
69 json_add_string(response, "direction", incoming ? "in" : "out");
70 json_add_address_internal(response, "address", addr);
71 return command_success(cmd, response);
72}
73
74/* FIXME: Reorder! */
75static void try_connect(const tal_t *ctx,

Callers 2

json_connectFunction · 0.85
connect_succeededFunction · 0.85

Calls 6

json_stream_successFunction · 0.70
command_successFunction · 0.70
json_add_node_idFunction · 0.50
json_add_hex_talarrFunction · 0.50
json_add_stringFunction · 0.50

Tested by

no test coverage detected