lightningd: add debugging into io_loop.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-09-28 13:11:18 +09:30
parent 8bb20d127d
commit 66c1da795f
3 changed files with 7 additions and 0 deletions

View File

@@ -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 \

View File

@@ -15,6 +15,7 @@
#include <ccan/tal/grab_file/grab_file.h>
#include <ccan/tal/path/path.h>
#include <ccan/tal/str/str.h>
#include <common/io_debug.h>
#include <common/timeout.h>
#include <common/utils.h>
#include <common/version.h>
@@ -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]);

View File

@@ -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(); }