mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-27 19:04:22 +01:00
lightningd: add debugging into io_loop.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -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 \
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user