connectd: do dev_disconnect logic.

As connectd handles more packets itself, or diverts them to/from gossipd,
it's the only place we can implement the dev_disconnect logic.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-01-08 23:55:29 +10:30
parent 9c0bb444b7
commit 7a514112ec
17 changed files with 71 additions and 70 deletions

View File

@@ -1,5 +1,4 @@
#include "config.h"
#include <common/dev_disconnect.h>
#include <common/status.h>
#include <common/subdaemon.h>
#include <common/version.h>
@@ -33,14 +32,5 @@ void subdaemon_setup(int argc, char *argv[])
daemon_maybe_debug(argv);
#if DEVELOPER
for (int i = 1; i < argc; i++) {
if (strstarts(argv[i], "--dev-disconnect=")) {
dev_disconnect_init(atoi(argv[i]
+ strlen("--dev-disconnect=")));
}
}
#endif
daemon_setup(argv[0], status_backtrace_print, status_backtrace_exit);
}