mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 08:34:20 +01:00
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:
3
utils.h
3
utils.h
@@ -10,6 +10,9 @@ extern secp256k1_context *secp256k1_ctx;
|
||||
/* Allocate and fill in a hex-encoded string of this data. */
|
||||
char *tal_hexstr(const tal_t *ctx, const void *data, size_t len);
|
||||
|
||||
/* Allocate and fill a hex-encoding of this tal pointer. */
|
||||
char *tal_hex(const tal_t *ctx, const tal_t *data);
|
||||
|
||||
/* Allocate and fill a buffer with the data of this hex string. */
|
||||
u8 *tal_hexdata(const tal_t *ctx, const void *str, size_t len);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user