#include "lightningd/notification.h" #include const char *notification_topics[] = { "connect", "disconnect", }; bool notifications_have_topic(const char *topic) { for (size_t i=0; istream, "id", nodeid); json_add_address_internal(n->stream, "address", addr); jsonrpc_notification_end(n); plugins_notify(ld->plugins, take(n)); } void notify_disconnect(struct lightningd *ld, struct node_id *nodeid) { struct jsonrpc_notification *n = jsonrpc_notification_start(NULL, notification_topics[1]); json_add_node_id(n->stream, "id", nodeid); jsonrpc_notification_end(n); plugins_notify(ld->plugins, take(n)); }