ensure `floorlog2` is available for use in `Custom types` section

This commit is contained in:
Etan Kissling 2024-01-09 14:54:52 +01:00
parent 05c2ce11db
commit 02d47f1554
No known key found for this signature in database
GPG Key ID: B21DA824C5A3D03D
1 changed files with 4 additions and 3 deletions

View File

@ -108,7 +108,7 @@ def objects_to_spec(preset_name: str,
if vardef.comment is not None: if vardef.comment is not None:
out += f' # {vardef.comment}' out += f' # {vardef.comment}'
return out return out
# Merge all constant objects # Merge all constant objects
hardcoded_ssz_dep_constants = reduce(lambda obj, builder: {**obj, **builder.hardcoded_ssz_dep_constants()}, builders, {}) hardcoded_ssz_dep_constants = reduce(lambda obj, builder: {**obj, **builder.hardcoded_ssz_dep_constants()}, builders, {})
hardcoded_custom_type_dep_constants = reduce(lambda obj, builder: {**obj, **builder.hardcoded_custom_type_dep_constants(spec_object)}, builders, {}) hardcoded_custom_type_dep_constants = reduce(lambda obj, builder: {**obj, **builder.hardcoded_custom_type_dep_constants(spec_object)}, builders, {})
@ -131,12 +131,13 @@ def objects_to_spec(preset_name: str,
imports, imports,
preparations, preparations,
f"fork = \'{fork}\'\n", f"fork = \'{fork}\'\n",
# The helper functions that some SSZ containers require. Need to be defined before `custom_type_dep_constants`
CONSTANT_DEP_SUNDRY_CONSTANTS_FUNCTIONS,
# The constants that some SSZ containers require. Need to be defined before `new_type_definitions` # The constants that some SSZ containers require. Need to be defined before `new_type_definitions`
custom_type_dep_constants, custom_type_dep_constants,
new_type_definitions,
CONSTANT_DEP_SUNDRY_CONSTANTS_FUNCTIONS,
# The constants that some SSZ containers require. Need to be defined before `constants_spec` # The constants that some SSZ containers require. Need to be defined before `constants_spec`
ssz_dep_constants, ssz_dep_constants,
new_type_definitions,
constant_vars_spec, constant_vars_spec,
preset_vars_spec, preset_vars_spec,
config_spec, config_spec,