mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-03 21:24:22 +01:00
wire/tlvstream: add tlv_make_fields helper to populate ->fields array.
This is vital for calculating merkle trees; I previously used towire+fromwire to get this! Requires generation change so we can magic the ARRAY_SIZE var (the C pre-processor can't uppercase things). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
5c167d16ab
commit
ff8830876d
@@ -121,7 +121,7 @@ bool ${tlv.name}_is_valid(const struct ${tlv.struct_name()} *record,
|
||||
size_t *err_index);
|
||||
|
||||
% if tlv.name in options.expose_tlv_type:
|
||||
#define TLVS_${tlv.name.upper()}_ARRAY_SIZE ${len(tlv.messages)}
|
||||
#define TLVS_ARRAY_SIZE_${tlv.name} ${len(tlv.messages)}
|
||||
extern const struct tlv_record_type tlvs_${tlv.name}[];
|
||||
|
||||
<%!
|
||||
|
||||
Reference in New Issue
Block a user