Browse Source

log: ability to log struct rval.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 9 years ago
parent
commit
d0285416fb
  1. 3
      daemon/log.c
  2. 1
      daemon/log.h

3
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 ? 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;
} }

1
daemon/log.h

@ -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_;
}; };

Loading…
Cancel
Save