resolve other ret comment

This commit is contained in:
protolambda 2019-06-18 21:53:39 +02:00
parent f4de5e3c72
commit 207f632e1a
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623
1 changed files with 2 additions and 3 deletions

View File

@ -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]