mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-08 16:44:22 +01:00
Use node_id everywhere for nodes.
I tried to just do gossipd, but it was uncontainable, so this ended up being a complete sweep. We didn't get much space saving in gossipd, even though we should save 24 bytes per node. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
b4455d517c
commit
a2fa699e0e
@@ -14,22 +14,22 @@ bool notifications_have_topic(const char *topic)
|
||||
return false;
|
||||
}
|
||||
|
||||
void notify_connect(struct lightningd *ld, struct pubkey *nodeid,
|
||||
void notify_connect(struct lightningd *ld, struct node_id *nodeid,
|
||||
struct wireaddr_internal *addr)
|
||||
{
|
||||
struct jsonrpc_notification *n =
|
||||
jsonrpc_notification_start(NULL, notification_topics[0]);
|
||||
json_add_pubkey(n->stream, "id", nodeid);
|
||||
json_add_node_id(n->stream, "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 pubkey *nodeid)
|
||||
void notify_disconnect(struct lightningd *ld, struct node_id *nodeid)
|
||||
{
|
||||
struct jsonrpc_notification *n =
|
||||
jsonrpc_notification_start(NULL, notification_topics[1]);
|
||||
json_add_pubkey(n->stream, "id", nodeid);
|
||||
json_add_node_id(n->stream, "id", nodeid);
|
||||
jsonrpc_notification_end(n);
|
||||
plugins_notify(ld->plugins, take(n));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user