mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
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:
@@ -83,10 +83,9 @@ static u32 get_node_announce_timestamp(const u8 *msg)
|
||||
u8 *features, *addresses;
|
||||
struct tlv_node_ann_tlvs *na_tlvs;
|
||||
|
||||
na_tlvs = tlv_node_ann_tlvs_new(tmpctx);
|
||||
if (fromwire_node_announcement(tmpctx, msg, &sig, &features, ×tamp,
|
||||
&id, rgb_color, alias, &addresses,
|
||||
na_tlvs))
|
||||
&na_tlvs))
|
||||
return timestamp;
|
||||
|
||||
errx(1, "Invalid node_announcement");
|
||||
|
||||
Reference in New Issue
Block a user