check bit lengths

This commit is contained in:
Danny Ryan 2019-07-22 07:13:07 -06:00
parent 7bc4fb6e01
commit 43a0ca4eeb
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 3 additions and 0 deletions

View File

@ -1654,6 +1654,9 @@ def process_attestation(state: BeaconState, attestation: Attestation) -> None:
attestation_slot = get_attestation_data_slot(state, data)
assert attestation_slot + MIN_ATTESTATION_INCLUSION_DELAY <= state.slot <= attestation_slot + SLOTS_PER_EPOCH
assert len(attestation.aggregation_bits) == len(committee)
assert len(attestation.custody_bits) == len(committee)
pending_attestation = PendingAttestation(
data=data,
aggregation_bits=attestation.aggregation_bits,