mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
wire-gen: simplify if statement
This commit is contained in:
committed by
Rusty Russell
parent
88786b8f7a
commit
f2ecf8e9c3
@@ -1252,9 +1252,9 @@ for line in fileinput.input(options.files):
|
|||||||
if parts == ['']:
|
if parts == ['']:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
is_tlv_msg = len(parts) == 3
|
if len(parts) in [1, 2, 3]:
|
||||||
if len(parts) == 1 or len(parts) == 2 or is_tlv_msg:
|
|
||||||
# eg: commit_sig,132,(_tlv)
|
# eg: commit_sig,132,(_tlv)
|
||||||
|
is_tlv_msg = len(parts) == 3
|
||||||
if len(parts) == 1: # this is a subtype, it has no type number.
|
if len(parts) == 1: # this is a subtype, it has no type number.
|
||||||
subtypes.append(Subtype(parts[0], comments))
|
subtypes.append(Subtype(parts[0], comments))
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user