log: ability to log struct rval.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2016-08-17 14:46:42 +09:30
parent 7b1187d446
commit d0285416fb
2 changed files with 3 additions and 1 deletions

View file

@ -326,7 +326,8 @@ static char *to_string_(const tal_t *ctx,
h->src ? to_string(ctx, lr, struct pubkey, h->src ? to_string(ctx, lr, struct pubkey,
h->src->peer->id) h->src->peer->id)
: "local"); : "local");
} } else if (streq(structname, "struct rval"))
s = tal_hexstr(ctx, u.rval, sizeof(*u.rval));
return s; return s;
} }

View file

@ -71,6 +71,7 @@ union loggable_structs {
const struct abs_locktime *abs_locktime; const struct abs_locktime *abs_locktime;
const struct bitcoin_tx *bitcoin_tx; const struct bitcoin_tx *bitcoin_tx;
const struct htlc *htlc; const struct htlc *htlc;
const struct rval *rval;
const char *charp_; const char *charp_;
}; };