| 1364 | }; |
| 1365 | |
| 1366 | static void |
| 1367 | peer_connected_serialize(struct peer_connected_hook_payload *payload, |
| 1368 | struct json_stream *stream, struct plugin *plugin) |
| 1369 | { |
| 1370 | json_object_start(stream, "peer"); |
| 1371 | json_add_node_id(stream, "id", &payload->peer_id); |
| 1372 | json_add_string(stream, "direction", payload->incoming ? "in" : "out"); |
| 1373 | json_add_string(stream, "addr", |
| 1374 | fmt_wireaddr_internal(tmpctx, &payload->addr)); |
| 1375 | if (payload->remote_addr) |
| 1376 | json_add_string(stream, "remote_addr", |
| 1377 | fmt_wireaddr(tmpctx, payload->remote_addr)); |
| 1378 | json_add_hex_talarr(stream, "features", payload->their_features); |
| 1379 | json_object_end(stream); /* .peer */ |
| 1380 | } |
| 1381 | |
| 1382 | static bool ignore_idle_channel(const struct lightningd *ld, |
| 1383 | const struct channel *channel) |
nothing calls this directly
no test coverage detected