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

Function connect_cmd_succeed

lightningd/connect_control.c:57–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57static struct command_result *connect_cmd_succeed(struct command *cmd,
58 const struct peer *peer,
59 bool incoming,
60 const struct wireaddr_internal *addr)
61{
62 struct json_stream *response = json_stream_success(cmd);
63 json_add_node_id(response, "id", &peer->id);
64 json_add_hex_talarr(response, "features", peer->their_features);
65 json_add_string(response, "direction", incoming ? "in" : "out");
66 json_add_address_internal(response, "address", addr);
67 return command_success(cmd, response);
68}
69
70struct id_and_addr {
71 struct node_id id;

Callers 2

json_connectFunction · 0.85
connect_succeededFunction · 0.85

Calls 6

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

Tested by

no test coverage detected