mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-09 08:04:19 +01:00
plugin: Use the json_add_secret wrapper to add the shared_secret
This was incorrectly handled before, hence the wrapper which checks correctness of the arguments. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
c91483f605
commit
9e511cbf3e
@@ -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");
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user