diff --git a/lightningd/Makefile b/lightningd/Makefile index 354f984da..0c6e2ca63 100644 --- a/lightningd/Makefile +++ b/lightningd/Makefile @@ -22,6 +22,7 @@ LIGHTNINGD_COMMON_OBJS := \ common/funding_tx.o \ common/htlc_state.o \ common/htlc_wire.o \ + common/io_debug.o \ common/key_derive.o \ common/json.o \ common/msg_queue.o \ diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index 5916c866a..f7bd99ab3 100644 --- a/lightningd/lightningd.c +++ b/lightningd/lightningd.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -233,6 +234,8 @@ int main(int argc, char *argv[]) secp256k1_ctx = secp256k1_context_create(SECP256K1_CONTEXT_VERIFY | SECP256K1_CONTEXT_SIGN); + io_poll_override(debug_poll); + /* Figure out where we are first. */ ld->daemon_dir = find_my_path(ld, argv[0]); diff --git a/lightningd/test/run-find_my_path.c b/lightningd/test/run-find_my_path.c index fe5a627f1..cd3548784 100644 --- a/lightningd/test/run-find_my_path.c +++ b/lightningd/test/run-find_my_path.c @@ -7,6 +7,9 @@ int unused_main(int argc, char *argv[]); /* Generated stub for crashlog_activate */ void crashlog_activate(const char *argv0 UNNEEDED, struct log *log UNNEEDED) { fprintf(stderr, "crashlog_activate called!\n"); abort(); } +/* Generated stub for debug_poll */ +int debug_poll(struct pollfd *fds UNNEEDED, nfds_t nfds UNNEEDED, int timeout UNNEEDED) +{ fprintf(stderr, "debug_poll called!\n"); abort(); } /* Generated stub for gossip_init */ void gossip_init(struct lightningd *ld UNNEEDED) { fprintf(stderr, "gossip_init called!\n"); abort(); }