n -> len(values)

This commit is contained in:
vbuterin 2019-02-06 18:34:05 -06:00 committed by GitHub
parent 6a5b7540da
commit 47b00f38dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -708,7 +708,7 @@ def shuffle(values: List[Any], seed: Bytes32) -> List[Any]:
for round in range(90):
hashvalues = b''.join([
hash(seed + round.to_bytes(1, 'big') + i.to_bytes(4, 'big'))
for i in range((n + 255) // 256)
for i in range((len(values) + 255) // 256)
])
pivot = int.from_bytes(hash(seed + round.to_bytes(1, 'big')), 'big') % n
def permute(pos):