Merge pull request #536 from ethereum/fix_attestation_sig

Remove the repeated checks
This commit is contained in:
vbuterin 2019-01-31 07:45:00 -06:00 committed by GitHub
commit 4cdb66728a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -1742,10 +1742,7 @@ For each `attestation` in `block.body.attestations`:
committee for committee, shard in get_crosslink_committees_at_slot(state, attestation.data.slot) committee for committee, shard in get_crosslink_committees_at_slot(state, attestation.data.slot)
if shard == attestation.data.shard if shard == attestation.data.shard
][0] ][0]
verify_bitfield(attestation.aggregation_bitfield, len(crosslink_committee)) for i in range(len(crosslink_committee)):
verify_bitfield(attestation.custody_bitfield, len(crosslink_committee))
for i in range(len(crosslink_committee):
if get_bitfield_bit(attestation.aggregation_bitfield, i) == 0b0: if get_bitfield_bit(attestation.aggregation_bitfield, i) == 0b0:
assert get_bitfield_bit(attestation.custody_bitfield, i) == 0b0 assert get_bitfield_bit(attestation.custody_bitfield, i) == 0b0