tools/generate_wire.py: make functions allocate the TLV.

Requiring the caller to allocate them is ugly, and differs from
other types.

This means we need a context arg if we don't have one already.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-03-23 10:01:14 +10:30
parent 2b422272e5
commit a770f51d0e
32 changed files with 199 additions and 199 deletions

View File

@@ -460,7 +460,6 @@ static void json_add_node(struct json_stream *js,
struct json_escape *esc;
struct tlv_node_ann_tlvs *na_tlvs;
na_tlvs = tlv_node_ann_tlvs_new(tmpctx);
if (!fromwire_node_announcement(nannounce, nannounce,
&signature,
&features,
@@ -469,7 +468,7 @@ static void json_add_node(struct json_stream *js,
rgb_color,
alias,
&addresses,
na_tlvs)) {
&na_tlvs)) {
plugin_log(plugin, LOG_BROKEN,
"Cannot parse stored node_announcement"
" for %s at %u: %s",