mirror of
https://github.com/lightning/bolts.git
synced 2024-11-19 10:00:04 +01:00
tools: update for new format.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
128966e3c0
commit
8ee57b9773
@ -67,15 +67,15 @@ parser.add_option("--message-fields",
|
|||||||
# Example inputs:
|
# Example inputs:
|
||||||
# 1. type: 17 (`error`)
|
# 1. type: 17 (`error`)
|
||||||
# 2. data:
|
# 2. data:
|
||||||
# * [8:channel-id]
|
# * [`8`:`channel_id`]
|
||||||
# * [4:len]
|
# * [`4`:`len`]
|
||||||
# * [len:data]
|
# * [`len`:`data`]
|
||||||
#
|
#
|
||||||
# 1. type: PERM|NODE|3 (`required_node_feature_missing`)
|
# 1. type: PERM|NODE|3 (`required_node_feature_missing`)
|
||||||
message = None
|
message = None
|
||||||
havedata = None
|
havedata = None
|
||||||
typeline = re.compile('1\. type: (?P<value>[-0-9A-Za-z_|]+) \(`(?P<name>[-A-Za-z_]+)`\)')
|
typeline = re.compile('1\. type: (?P<value>[-0-9A-Za-z_|]+) \(`(?P<name>[A-Za-z_]+)`\)')
|
||||||
dataline = re.compile('\s+\* \[(?P<size>[-a-z0-9*+]+):(?P<name>[-a-z0-9_]+)\]')
|
dataline = re.compile('\s+\* \[`(?P<size>[_a-z0-9*+]+)`:`(?P<name>[_a-z0-9]+)`\]')
|
||||||
|
|
||||||
for i,line in enumerate(fileinput.input(args)):
|
for i,line in enumerate(fileinput.input(args)):
|
||||||
line = line.rstrip()
|
line = line.rstrip()
|
||||||
|
@ -51,15 +51,15 @@ do
|
|||||||
if [ -n "$CHECK" ]; then
|
if [ -n "$CHECK" ]; then
|
||||||
# Eliminate the following:
|
# Eliminate the following:
|
||||||
# #-references eg. [Use of segwit](#use-of-segwit)
|
# #-references eg. [Use of segwit](#use-of-segwit)
|
||||||
# quoted identifers eg. `htlc-id`
|
# quoted identifers eg. `htlc_id`
|
||||||
# field descriptions, eg. `* [num-htlcs*64:htlc-signature]'
|
# field descriptions, eg. `* [`num_htlcs*64`:`htlc_signature]'
|
||||||
# indented field names, eg. ' num_htlcs: 0'
|
# indented field names, eg. ' `num_htlcs`: 0'
|
||||||
# Short hex strings, eg '0x2bb038521914'
|
# Short hex strings, eg '0x2bb038521914'
|
||||||
# long hex strings
|
# long hex strings
|
||||||
# long base58 strings
|
# long base58 strings
|
||||||
WORDS=$(sed -e 's/\](#[-a-zA-Z0-9_]*)//g' \
|
WORDS=$(sed -e 's/\](#[-a-zA-Z0-9_]*)//g' \
|
||||||
-e 's/`[-a-zA-Z0-9_]*`//g' \
|
-e 's/`[a-zA-Z0-9_]*`//g' \
|
||||||
-e 's/\* \[[-_a-z0-9*]\+:[-_a-z0-9]\+\]//g' \
|
-e 's/\* \[`[_a-z0-9*]\+`://g' \
|
||||||
-e 's/0x[a-fA-F0-9]\+//g' \
|
-e 's/0x[a-fA-F0-9]\+//g' \
|
||||||
-e 's/[a-fA-F0-9]\{20,\}//g' \
|
-e 's/[a-fA-F0-9]\{20,\}//g' \
|
||||||
-e 's/^ .*_htlcs//g' \
|
-e 's/^ .*_htlcs//g' \
|
||||||
|
Loading…
Reference in New Issue
Block a user