From 31e2e70f17088161c66326d0f38dbd64ee0a6aca Mon Sep 17 00:00:00 2001 From: trueptolemy <823220586@qq.com> Date: Sun, 16 Jun 2019 16:31:42 +0800 Subject: [PATCH] invoice: a cleanup for the json of struct sha256 Here should't be accessed directly to the underlying of struct sha256. --- lightningd/invoice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightningd/invoice.c b/lightningd/invoice.c index d2694cdb5..a0f14a9ad 100644 --- a/lightningd/invoice.c +++ b/lightningd/invoice.c @@ -514,7 +514,7 @@ static void gossipd_incoming_channels_reply(struct subd *gossipd, details = wallet_invoice_details(info, wallet, invoice); response = json_stream_success(info->cmd); - json_add_hex(response, "payment_hash", details->rhash.u.u8, + json_add_hex(response, "payment_hash", &details->rhash, sizeof(details->rhash)); json_add_u64(response, "expires_at", details->expiry_time); json_add_string(response, "bolt11", details->bolt11);