-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools: update CSV generator to output fields for tlv's and subtypes #597
Conversation
v1.1 message formats add new types (tlv's and subtypes). this updates the csv extraction tool to appropriately output them
Updated to match what the CSV generator in the RFC repo actually outputs, see lightning/bolts#597
Updated to match what the CSV generator in the RFC repo actually outputs, see lightning/bolts#597
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice to have the output form listed somewhere too (it's currently pretty undocumented).
tools/extract-formats.py
Outdated
else: | ||
print("{},{}".format( | ||
match.group('name'), | ||
str(match.group('value') or '$')), file=output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think subtypes should just be a single field, ie. no value. Rather than a double field with a magic '$' sign?
subtypes used to use a magic '$' to designate that they were embedded; now we print them without magic. previous: input_info,$ input_info,0,xxx now: input_info input_info,0,xxx previous: funding_message,2,field,8 funding_message,10,num_inputs,2 funding_message,12,input_info,$num_inputs now: funding_message,2,field,8 funding_message,10,num_inputs,2 funding_message,12,input_info,num_inputs*input_info
For example, @cdecker used a FRAME_SIZE constant in lightning#593 which broke parsing. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ACK 33ff459 |
1. Uses 'tlvs' for the "length" of tlv streams. 2. Allow - inside length of fields, since it's useful given an implied tlv_len. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
I think this was rolled into #622 ? |
Closed in favor of #622 which was merged. |
v1.1 message formats add new types (tlv's and subtypes). this updates
the csv extraction tool to appropriately output them