| 1053 | }; |
| 1054 | |
| 1055 | static void |
| 1056 | peer_connected_serialize(struct peer_connected_hook_payload *payload, |
| 1057 | struct json_stream *stream, struct plugin *plugin) |
| 1058 | { |
| 1059 | const struct peer *p = payload->peer; |
| 1060 | json_object_start(stream, "peer"); |
| 1061 | json_add_node_id(stream, "id", &p->id); |
| 1062 | json_add_string(stream, "direction", payload->incoming ? "in" : "out"); |
| 1063 | json_add_string( |
| 1064 | stream, "addr", |
| 1065 | type_to_string(stream, struct wireaddr_internal, &payload->addr)); |
| 1066 | if (payload->remote_addr) |
| 1067 | json_add_string( |
| 1068 | stream, "remote_addr", |
| 1069 | type_to_string(stream, struct wireaddr, payload->remote_addr)); |
| 1070 | json_add_hex_talarr(stream, "features", p->their_features); |
| 1071 | json_object_end(stream); /* .peer */ |
| 1072 | } |
| 1073 | |
| 1074 | /* Talk to connectd about an active channel */ |
| 1075 | static void connect_activate_subd(struct lightningd *ld, struct channel *channel) |
nothing calls this directly
no test coverage detected