| 1429 | }; |
| 1430 | |
| 1431 | static void |
| 1432 | peer_connected_serialize(struct peer_connected_hook_payload *payload, |
| 1433 | struct json_stream *stream, struct plugin *plugin) |
| 1434 | { |
| 1435 | json_object_start(stream, "peer"); |
| 1436 | json_add_node_id(stream, "id", &payload->peer_id); |
| 1437 | json_add_string(stream, "direction", payload->incoming ? "in" : "out"); |
| 1438 | json_add_string(stream, "addr", |
| 1439 | fmt_wireaddr_internal(tmpctx, &payload->addr)); |
| 1440 | if (payload->remote_addr) |
| 1441 | json_add_string(stream, "remote_addr", |
| 1442 | fmt_wireaddr(tmpctx, payload->remote_addr)); |
| 1443 | json_add_hex_talarr(stream, "features", payload->their_features); |
| 1444 | json_object_end(stream); /* .peer */ |
| 1445 | } |
| 1446 | |
| 1447 | static bool ignore_idle_channel(const struct lightningd *ld, |
| 1448 | const struct channel *channel) |
nothing calls this directly
no test coverage detected