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

Function connect_cmd_succeed

lightningd/connect_control.c:54–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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