lightningd: add json_add_tx helper.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-06-05 14:59:01 +09:30
parent aa21eea62b
commit 7e02fbe6ec
6 changed files with 29 additions and 10 deletions

View File

@@ -758,9 +758,8 @@ openchannel_hook_serialize(struct openchannel_hook_payload *payload,
json_add_num(stream, "max_accepted_htlcs", payload->max_accepted_htlcs);
json_add_num(stream, "channel_flags", payload->channel_flags);
if (tal_count(payload->shutdown_scriptpubkey) != 0)
json_add_hex(stream, "shutdown_scriptpubkey",
payload->shutdown_scriptpubkey,
tal_count(payload->shutdown_scriptpubkey));
json_add_hex_talarr(stream, "shutdown_scriptpubkey",
payload->shutdown_scriptpubkey);
json_object_end(stream); /* .openchannel */
}