json: json_add_hex_talarr for common case of dumping a tal object in hex.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-07-28 15:23:33 +09:30
committed by Christian Decker
parent d752a0099c
commit eae9b81099
12 changed files with 44 additions and 42 deletions

View File

@@ -419,6 +419,13 @@ void json_add_hex(struct json_result *result, const char *fieldname,
tal_free(hex);
}
void json_add_hex_talarr(struct json_result *result,
const char *fieldname,
const tal_t *data)
{
json_add_hex(result, fieldname, data, tal_len(data));
}
void json_add_object(struct json_result *result, ...)
{
va_list ap;