mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
tlv: Migrate tlv serialization to typesafe function
This commit is contained in:
committed by
Rusty Russell
parent
e12b5c3824
commit
626675c83c
@@ -409,7 +409,7 @@ u8 *towire_${msg.name}(const tal_t *ctx${''.join([f.arg_desc_to() for f in msg.f
|
||||
% endif
|
||||
% endif
|
||||
% elif f.type_obj.is_tlv():
|
||||
towire_tlvs(&p, tlvs_${f.type_obj.tlv.name}, ARRAY_SIZE(tlvs_${f.type_obj.tlv.name}), ${f.name});
|
||||
towire_${f.type_obj.tlv.name}(&p, ${f.name});
|
||||
% elif f.is_optional: ## is optional?
|
||||
if (!${f.name})
|
||||
towire_bool(&p, false);
|
||||
|
||||
Reference in New Issue
Block a user