mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
tools/generate-wire.py: allow consecutive fields to use same len var.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
6f181e0dc1
commit
cb5ad91788
@ -410,8 +410,12 @@ for line in fileinput.input(options.files):
|
||||
# commit_sig,0,channel-id,u64
|
||||
for m in messages:
|
||||
if m.name == parts[0]:
|
||||
m.addField(Field(parts[0], parts[2], parts[3], comments, prevfield))
|
||||
prevfield = parts[2]
|
||||
f = Field(parts[0], parts[2], parts[3], comments, prevfield)
|
||||
m.addField(f)
|
||||
# If it used prevfield as lenvar, keep that for next
|
||||
# time (multiple fields can use the same lenvar).
|
||||
if not f.lenvar:
|
||||
prevfield = parts[2]
|
||||
break
|
||||
comments=[]
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user