Use constants
This commit is contained in:
parent
1d4f467516
commit
993bcdf082
|
@ -10,7 +10,7 @@ from eth2spec.config import config_util
|
||||||
from eth2spec.phase0 import spec as spec_phase0
|
from eth2spec.phase0 import spec as spec_phase0
|
||||||
from eth2spec.phase1 import spec as spec_phase1
|
from eth2spec.phase1 import spec as spec_phase1
|
||||||
from eth2spec.lightclient_patch import spec as spec_lightclient_patch
|
from eth2spec.lightclient_patch import spec as spec_lightclient_patch
|
||||||
from eth2spec.test.context import PHASE0, PHASE1, LIGHTCLIENT_PATCH
|
from eth2spec.test.context import PHASE0, PHASE1, LIGHTCLIENT_PATCH, TESTGEN_FORKS, MINIMAL, MAINNET
|
||||||
from eth2spec.utils.ssz.ssz_typing import Container
|
from eth2spec.utils.ssz.ssz_typing import Container
|
||||||
from eth2spec.utils.ssz.ssz_impl import (
|
from eth2spec.utils.ssz.ssz_impl import (
|
||||||
hash_tree_root,
|
hash_tree_root,
|
||||||
|
@ -87,14 +87,14 @@ if __name__ == "__main__":
|
||||||
settings = []
|
settings = []
|
||||||
seed = 1
|
seed = 1
|
||||||
for mode in random_value.RandomizationMode:
|
for mode in random_value.RandomizationMode:
|
||||||
settings.append((seed, "minimal", mode, False, 30))
|
settings.append((seed, MINIMAL, mode, False, 30))
|
||||||
seed += 1
|
seed += 1
|
||||||
settings.append((seed, "minimal", random_value.RandomizationMode.mode_random, True, 30))
|
settings.append((seed, MINIMAL, random_value.RandomizationMode.mode_random, True, 30))
|
||||||
seed += 1
|
seed += 1
|
||||||
settings.append((seed, "mainnet", random_value.RandomizationMode.mode_random, False, 5))
|
settings.append((seed, MAINNET, random_value.RandomizationMode.mode_random, False, 5))
|
||||||
seed += 1
|
seed += 1
|
||||||
|
|
||||||
for fork in [PHASE0, LIGHTCLIENT_PATCH]:
|
for fork in TESTGEN_FORKS:
|
||||||
gen_runner.run_generator("ssz_static", [
|
gen_runner.run_generator("ssz_static", [
|
||||||
create_provider(fork, config_name, seed, mode, chaos, cases_if_random)
|
create_provider(fork, config_name, seed, mode, chaos, cases_if_random)
|
||||||
for (seed, config_name, mode, chaos, cases_if_random) in settings
|
for (seed, config_name, mode, chaos, cases_if_random) in settings
|
||||||
|
|
Loading…
Reference in New Issue