mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +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:
@@ -358,7 +358,7 @@ class Type(FieldSet):
|
||||
def is_varsize(self):
|
||||
""" A type is variably sized if it's marked as such (in varsize_types)
|
||||
or it contains a field of variable length """
|
||||
return self.name in self.varsize_types or self.has_len_fields()
|
||||
return self.name in self.varsize_types or self.has_len_fields() or self.is_tlv()
|
||||
|
||||
def add_comments(self, comments):
|
||||
self.type_comments = comments
|
||||
|
||||
Reference in New Issue
Block a user