| 52 | } |
| 53 | |
| 54 | static 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 | |
| 67 | struct id_and_addr { |
| 68 | struct node_id id; |
no test coverage detected