plugin: Add connect and disconnect notifications

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2018-12-13 13:58:40 +01:00
parent 5813567856
commit 26f17e87a3
6 changed files with 47 additions and 0 deletions

View File

@@ -21,6 +21,7 @@
#include <lightningd/jsonrpc.h>
#include <lightningd/lightningd.h>
#include <lightningd/log.h>
#include <lightningd/notification.h>
#include <lightningd/opening_control.h>
#include <lightningd/peer_control.h>
#include <lightningd/subd.h>
@@ -85,6 +86,7 @@ static void uncommitted_channel_disconnect(struct uncommitted_channel *uc,
subd_send_msg(uc->peer->ld->connectd, msg);
if (uc->fc)
was_pending(command_fail(uc->fc->cmd, LIGHTNINGD, "%s", desc));
notify_disconnect(uc->peer->ld, &uc->peer->id);
}
void kill_uncommitted_channel(struct uncommitted_channel *uc,