mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-10 02:35:41 +00:00
6289664260
1. Add `with_configs` decorator to assign available configs 2. Add `only_full_crosslink` decorator to detect if the configuation can do full crosslinking 3. Add `context.is_pytest` flag: True if calling via pytest. False if calling from test generator.
Eth2 config util
For configuration, see Configs documentation.
Usage:
configs_path = 'configs/'
...
from eth2spec.config import config_util
from eth2spec.phase0 import spec
from importlib import reload
config_util.prepare_config(configs_path, 'mainnet')
# reload spec to make loaded config effective
reload(spec)
WARNING: this overwrites globals, make sure to prevent accidental collisions with other usage of the same imported specs package.