utils: add tal_hex() helper.

This is a shortcut when the data being dumped is a tal array.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-01-10 15:19:25 +10:30
parent 4a233090ae
commit 7b1a4fc765
8 changed files with 20 additions and 16 deletions

View File

@@ -211,8 +211,7 @@ struct bitcoin_tx *create_commit_tx(const tal_t *ctx,
log_add_struct(peer->log, " rhash %s", struct sha256,
&h->rhash);
log_debug(peer->log, "Script: %s",
tal_hexstr(tmpctx,
wscript, tal_count(wscript)));
tal_hex(tmpctx, wscript));
} else
log_debug(peer->log, "DOES NOT pay %"PRIu64" to htlc %"PRIu64,
h->msatoshi / 1000, h->id);