|
|
@ -278,6 +278,15 @@ static void pidfile_create(const struct lightningd *ld) |
|
|
|
write_all(pid_fd, pid, strlen(pid)); |
|
|
|
} |
|
|
|
|
|
|
|
/* Yuck, we need globals here. */ |
|
|
|
static int (*io_poll_debug)(struct pollfd *, nfds_t, int); |
|
|
|
static int io_poll_lightningd(struct pollfd *fds, nfds_t nfds, int timeout) |
|
|
|
{ |
|
|
|
db_assert_no_outstanding_statements(); |
|
|
|
|
|
|
|
return io_poll_debug(fds, nfds, timeout); |
|
|
|
} |
|
|
|
|
|
|
|
int main(int argc, char *argv[]) |
|
|
|
{ |
|
|
|
setup_locale(); |
|
|
@ -310,6 +319,9 @@ int main(int argc, char *argv[]) |
|
|
|
ld->owned_txfilter = txfilter_new(ld); |
|
|
|
ld->topology->wallet = ld->wallet; |
|
|
|
|
|
|
|
/* We do extra checks in io_loop. */ |
|
|
|
io_poll_debug = io_poll_override(io_poll_lightningd); |
|
|
|
|
|
|
|
/* Set up HSM. */ |
|
|
|
hsm_init(ld, newdir); |
|
|
|
|
|
|
|