diff --git a/lightningd/peer_htlcs.c b/lightningd/peer_htlcs.c index 8545f426d..aaea0484a 100644 --- a/lightningd/peer_htlcs.c +++ b/lightningd/peer_htlcs.c @@ -721,7 +721,7 @@ static void htlc_accepted_hook_serialize(struct htlc_accepted_hook_payload *p, } json_add_hex_talarr(s, "next_onion", p->next_onion); - json_add_hex(s, "shared_secret", &hin->shared_secret, sizeof(hin->shared_secret)); + json_add_secret(s, "shared_secret", hin->shared_secret); json_object_end(s); json_object_start(s, "htlc"); diff --git a/wallet/test/run-wallet.c b/wallet/test/run-wallet.c index da7d2e056..13fefd28a 100644 --- a/wallet/test/run-wallet.c +++ b/wallet/test/run-wallet.c @@ -254,6 +254,11 @@ void json_add_num(struct json_stream *result UNNEEDED, const char *fieldname UNN void json_add_s32(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED, int32_t value UNNEEDED) { fprintf(stderr, "json_add_s32 called!\n"); abort(); } +/* Generated stub for json_add_secret */ +void json_add_secret(struct json_stream *response UNNEEDED, + const char *fieldname UNNEEDED, + const struct secret *secret UNNEEDED) +{ fprintf(stderr, "json_add_secret called!\n"); abort(); } /* Generated stub for json_add_short_channel_id */ void json_add_short_channel_id(struct json_stream *response UNNEEDED, const char *fieldname UNNEEDED,