mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
tools/generate-wire.py: handle non-integer enum values.
BOLT 4 uses values like "PERM|1", so allow that. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -365,7 +365,7 @@ for line in fileinput.input(options.files):
|
|||||||
|
|
||||||
if len(parts) == 2:
|
if len(parts) == 2:
|
||||||
# eg commit_sig,132
|
# eg commit_sig,132
|
||||||
messages.append(Message(parts[0],Enumtype("WIRE_" + parts[0].upper(), int(parts[1],0)),comments))
|
messages.append(Message(parts[0],Enumtype("WIRE_" + parts[0].upper(), parts[1]), comments))
|
||||||
comments=[]
|
comments=[]
|
||||||
else:
|
else:
|
||||||
# eg commit_sig,0,channel-id,8 OR
|
# eg commit_sig,0,channel-id,8 OR
|
||||||
|
|||||||
Reference in New Issue
Block a user