Update 0_beacon-chain.md

This commit is contained in:
Justin 2019-02-05 11:49:52 -08:00 committed by GitHub
parent 867dea3473
commit 1d76ad65ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -1100,10 +1100,9 @@ def verify_bitfield(bitfield: bytes, committee_size: int) -> bool:
return False
# Check if `bitfield` has padding zeros
if committee_size % 8 != 0:
for i in range(committee_size, committee_size - committee_size % 8 + 8):
if get_bitfield_bit(bitfield, i) == 0b1:
return False
for i in range(committee_size, len(bitfield) * 8):
if get_bitfield_bit(bitfield, i) == 0b1:
return False
return True
```