diff --git a/scripts/build_spec.py b/scripts/build_spec.py index 4890beaac..b7605df60 100644 --- a/scripts/build_spec.py +++ b/scripts/build_spec.py @@ -91,13 +91,12 @@ def compute_committee(indices: List[ValidatorIndex], # type: ignore # Monkey patch hash cache _hash = hash -hash_cache: Dict[bytes, Bytes32] = {} +hash_cache: Dict[bytes, Hash] = {} def hash(x: bytes) -> Hash: if x not in hash_cache: - ret = _hash(x) - hash_cache[x] = Hash(ret) + hash_cache[x] = Hash(_hash(x)) return hash_cache[x]