get_attestation_participants: inline ceil_div8() (#430)

This commit is contained in:
Stan Drozd 2019-01-11 15:37:38 +01:00 committed by Justin
parent 3c2da5d034
commit d9c6ad9008
1 changed files with 1 additions and 1 deletions

View File

@ -979,7 +979,7 @@ def get_attestation_participants(state: BeaconState,
# Find the relevant committee # Find the relevant committee
shard_committees = get_shard_committees_at_slot(state, attestation_data.slot) shard_committees = get_shard_committees_at_slot(state, attestation_data.slot)
shard_committee = [x for x in shard_committees if x.shard == attestation_data.shard][0] shard_committee = [x for x in shard_committees if x.shard == attestation_data.shard][0]
assert len(participation_bitfield) == ceil_div8(len(shard_committee.committee)) assert len(participation_bitfield) == (len(shard_committee.committee) + 7) // 8
# Find the participating attesters in the committee # Find the participating attesters in the committee
participants = [] participants = []