mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-10 09:34:22 +01:00
plugin: Add connect and disconnect notifications
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <lightningd/jsonrpc.h>
|
||||
#include <lightningd/log.h>
|
||||
#include <lightningd/memdump.h>
|
||||
#include <lightningd/notification.h>
|
||||
#include <lightningd/onchain_control.h>
|
||||
#include <lightningd/opening_control.h>
|
||||
#include <lightningd/options.h>
|
||||
@@ -381,6 +382,7 @@ void channel_errmsg(struct channel *channel,
|
||||
|
||||
/* Make sure channel_fail_permanent doesn't tell connectd we died! */
|
||||
channel->connected = false;
|
||||
notify_disconnect(channel->peer->ld, &channel->peer->id);
|
||||
|
||||
/* BOLT #1:
|
||||
*
|
||||
@@ -504,6 +506,8 @@ void peer_connected(struct lightningd *ld, const u8 *msg,
|
||||
abort();
|
||||
}
|
||||
|
||||
notify_connect(ld, &id, &addr);
|
||||
|
||||
/* No err, all good. */
|
||||
error = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user