Skip to content

Commit

Permalink
Merge pull request #573 from ethereum/hwwhww/verify_bitfield
Browse files Browse the repository at this point in the history
Fix `verify_bitfield`
  • Loading branch information
djrtwo committed Feb 6, 2019
2 parents e5788f5 + 180c8a0 commit ec1a082
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion specs/core/0_beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,8 @@ def verify_bitfield(bitfield: bytes, committee_size: int) -> bool:
if len(bitfield) != (committee_size + 7) // 8:
return False

for i in range(committee_size + 1, committee_size - committee_size % 8 + 8):
# Check `bitfield` is padded with zero bits only
for i in range(committee_size, len(bitfield) * 8):
if get_bitfield_bit(bitfield, i) == 0b1:
return False

Expand Down

0 comments on commit ec1a082

Please sign in to comment.