fix YAML parsed list of ints
This commit is contained in:
parent
9718d206a7
commit
63687e6f34
|
@ -179,7 +179,7 @@ MAX_SHARD_BLOCK_CHUNKS: 4
|
|||
# 3 * 2**16` (= 196,608)
|
||||
TARGET_SHARD_BLOCK_SIZE: 196608
|
||||
# Note: MAX_SHARD_BLOCKS_PER_ATTESTATION is derived from the list length.
|
||||
# SHARD_BLOCK_OFFSETS: [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233]
|
||||
SHARD_BLOCK_OFFSETS: [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233]
|
||||
# len(SHARD_BLOCK_OFFSETS)
|
||||
MAX_SHARD_BLOCKS_PER_ATTESTATION: 12
|
||||
# 2**14 (= 16,384) Gwei
|
||||
|
|
|
@ -180,7 +180,7 @@ MAX_SHARD_BLOCK_CHUNKS: 4
|
|||
# 3 * 2**16` (= 196,608)
|
||||
TARGET_SHARD_BLOCK_SIZE: 196608
|
||||
# Note: MAX_SHARD_BLOCKS_PER_ATTESTATION is derived from the list length.
|
||||
# SHARD_BLOCK_OFFSETS: [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233]
|
||||
SHARD_BLOCK_OFFSETS: [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233]
|
||||
# len(SHARD_BLOCK_OFFSETS)
|
||||
MAX_SHARD_BLOCKS_PER_ATTESTATION: 12
|
||||
# 2**14 (= 16,384) Gwei
|
||||
|
|
|
@ -36,7 +36,8 @@ def load_config_file(configs_dir, presets_name) -> Dict[str, Any]:
|
|||
out = dict()
|
||||
for k, v in loaded.items():
|
||||
if isinstance(v, list):
|
||||
out[k] = v
|
||||
# Clean up integer values. YAML parser renders lists of ints as list of str
|
||||
out[k] = [int(item) if item.isdigit() else item for item in v]
|
||||
elif isinstance(v, str) and v.startswith("0x"):
|
||||
out[k] = bytes.fromhex(v[2:])
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue