From b66d6a0d558da1d7160167978237d60b17cdc349 Mon Sep 17 00:00:00 2001 From: Simon Vrouwe Date: Thu, 14 Feb 2019 12:34:32 +0200 Subject: [PATCH] lightningd/json_fundchannel: use json_add_string to add hex_tx to response, similar as in json_withdraw --- lightningd/opening_control.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lightningd/opening_control.c b/lightningd/opening_control.c index 785760097..da9368373 100644 --- a/lightningd/opening_control.c +++ b/lightningd/opening_control.c @@ -73,7 +73,7 @@ struct funding_channel { u8 channel_flags; /* Variables we need to compose fields in cmd's response */ - u8 *linear; + const char *hextx; struct channel_id cid; /* Peer we're trying to reach. */ @@ -245,7 +245,7 @@ static void funding_broadcast_success(struct channel *channel) response = json_stream_success(cmd); json_object_start(response, NULL); - json_add_hex_talarr(response, "tx", fc->linear); + json_add_string(response, "tx", fc->hextx); json_add_txid(response, "txid", &channel->funding_txid); json_add_string(response, "channel_id", type_to_string(tmpctx, struct channel_id, &fc->cid)); @@ -414,7 +414,7 @@ static void opening_funder_finished(struct subd *openingd, const u8 *resp, txfilter_add_scriptpubkey(ld->owned_txfilter, fundingtx->output[!funding_outnum].script); /* We need these to compose cmd's response in funding_broadcast_success */ - fc->linear = linearize_tx(fc->cmd, fundingtx); + fc->hextx = tal_hex(fc, linearize_tx(fc->cmd, fundingtx)); derive_channel_id(&fc->cid, &channel->funding_txid, funding_outnum); /* Send it out and watch for confirms. */