This commit is contained in:
Danny Ryan 2019-01-30 10:43:06 -08:00 committed by GitHub
parent 0e7953fe8a
commit 3c4615df01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1632,7 +1632,10 @@ For each `attestation` in `block.body.attestations`:
assert attestation.custody_bitfield == b'\x00' * len(attestation.custody_bitfield) # [TO BE REMOVED IN PHASE 1] assert attestation.custody_bitfield == b'\x00' * len(attestation.custody_bitfield) # [TO BE REMOVED IN PHASE 1]
assert attestation.aggregation_bitfield != b'\x00' * len(attestation.aggregation_bitfield) assert attestation.aggregation_bitfield != b'\x00' * len(attestation.aggregation_bitfield)
crosslink_committee = get_crosslink_committee_at_slot(state, attestation.data.slot)[0] crosslink_committee = [
committee for committee, shard in get_crosslink_committees_at_slot(state, attestation.data.slot)
if shard == attestation.data.shard
][0]
verify_bitfield(attestation.aggregation_bitfield, len(crosslink_committee)) verify_bitfield(attestation.aggregation_bitfield, len(crosslink_committee))
verify_bitfield(attestation.custody_bitfield, len(crosslink_committee)) verify_bitfield(attestation.custody_bitfield, len(crosslink_committee))