mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-21 23:08:12 +00:00
fix typed constants in spec func puller
This commit is contained in:
parent
9df17f5494
commit
5398281a1f
@ -74,15 +74,14 @@ def get_spec(file_name: str) -> SpecObject:
|
|||||||
row[i] = row[i].strip().strip('`')
|
row[i] = row[i].strip().strip('`')
|
||||||
if '`' in row[i]:
|
if '`' in row[i]:
|
||||||
row[i] = row[i][:row[i].find('`')]
|
row[i] = row[i][:row[i].find('`')]
|
||||||
if row[1].startswith('uint') or row[1].startswith('Bytes'):
|
is_constant_def = True
|
||||||
|
if row[0][0] not in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_':
|
||||||
|
is_constant_def = False
|
||||||
|
for c in row[0]:
|
||||||
|
if c not in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789':
|
||||||
|
is_constant_def = False
|
||||||
|
if is_constant_def:
|
||||||
|
constants[row[0]] = row[1].replace('**TBD**', '0x1234567890123456789012345678901234567890')
|
||||||
|
elif row[1].startswith('uint') or row[1].startswith('Bytes'):
|
||||||
custom_types[row[0]] = row[1]
|
custom_types[row[0]] = row[1]
|
||||||
else:
|
|
||||||
eligible = True
|
|
||||||
if row[0][0] not in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_':
|
|
||||||
eligible = False
|
|
||||||
for c in row[0]:
|
|
||||||
if c not in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789':
|
|
||||||
eligible = False
|
|
||||||
if eligible:
|
|
||||||
constants[row[0]] = row[1].replace('**TBD**', '0x1234567890123456789012345678901234567890')
|
|
||||||
return functions, custom_types, constants, ssz_objects, inserts
|
return functions, custom_types, constants, ssz_objects, inserts
|
||||||
|
Loading…
x
Reference in New Issue
Block a user