diff --git a/tools/gen/header_template b/tools/gen/header_template index 962684c3d..e03168d64 100644 --- a/tools/gen/header_template +++ b/tools/gen/header_template @@ -79,8 +79,8 @@ void fromwire_${subtype.name}(const u8 **cursor, size_t *plen, ${subtype.type_na % for c in msg.msg_comments: /* ${c} */ % endfor -u8 *towire_${msg.name}(const tal_t *ctx${''.join([f.arg_desc_to() for f in msg.fields.values() if not f.is_optional])}); -bool fromwire_${msg.name}(${'const tal_t *ctx, ' if msg.has_len_fields() else ''}const void *p${''.join([f.arg_desc_from() for f in msg.fields.values() if not f.is_optional])}); +u8 *towire_${msg.name}(const tal_t *ctx${''.join([f.arg_desc_to() for f in msg.fields.values()])}); +bool fromwire_${msg.name}(${'const tal_t *ctx, ' if msg.needs_context() else ''}const void *p${''.join([f.arg_desc_from() for f in msg.fields.values()])}); % endfor #endif /* LIGHTNING_${idem} */ diff --git a/tools/gen/impl_template b/tools/gen/impl_template index d0d8a5ced..d106c4d61 100644 --- a/tools/gen/impl_template +++ b/tools/gen/impl_template @@ -144,7 +144,7 @@ fromwire_${type_}(${'ctx, ' if f.needs_context() else ''}&cursor, &plen, ${'*' i % for c in msg.msg_comments: /* ${c} */ % endfor -u8 *towire_${msg.name}(const tal_t *ctx${''.join([f.arg_desc_to() for f in msg.fields.values() if not f.is_optional])}) +u8 *towire_${msg.name}(const tal_t *ctx${''.join([f.arg_desc_to() for f in msg.fields.values()])}) { ## FIXME: we're ignoring TLV's rn % for f in msg.get_len_fields():