From d0285416fb143e0521ed528d9873b84fd00beb1a Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 17 Aug 2016 14:46:42 +0930 Subject: [PATCH] log: ability to log struct rval. Signed-off-by: Rusty Russell --- daemon/log.c | 3 ++- daemon/log.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon/log.c b/daemon/log.c index 54dd371e4..6ee6a3608 100644 --- a/daemon/log.c +++ b/daemon/log.c @@ -326,7 +326,8 @@ static char *to_string_(const tal_t *ctx, h->src ? to_string(ctx, lr, struct pubkey, h->src->peer->id) : "local"); - } + } else if (streq(structname, "struct rval")) + s = tal_hexstr(ctx, u.rval, sizeof(*u.rval)); return s; } diff --git a/daemon/log.h b/daemon/log.h index 96156411f..7f45c3276 100644 --- a/daemon/log.h +++ b/daemon/log.h @@ -71,6 +71,7 @@ union loggable_structs { const struct abs_locktime *abs_locktime; const struct bitcoin_tx *bitcoin_tx; const struct htlc *htlc; + const struct rval *rval; const char *charp_; };