Sort committees before hashing (#36)
This commit is contained in:
parent
1d3bf3c6d8
commit
ff09cf8bb8
|
@ -8,7 +8,7 @@ import random
|
||||||
|
|
||||||
def blake2b_hash(committee: Committee) -> bytes:
|
def blake2b_hash(committee: Committee) -> bytes:
|
||||||
hasher = blake2b(digest_size=32)
|
hasher = blake2b(digest_size=32)
|
||||||
for member in committee:
|
for member in sorted(committee):
|
||||||
hasher.update(member)
|
hasher.update(member)
|
||||||
return hasher.digest()
|
return hasher.digest()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue