Merge pull request #903 from ralexstokes/update-verify-indexed-attestation

Avoid materializing the merged list.
This commit is contained in:
Danny Ryan 2019-04-12 19:07:01 +10:00 committed by GitHub
commit c119565d8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1194,7 +1194,7 @@ def verify_indexed_attestation(state: BeaconState, indexed_attestation: IndexedA
if len(custody_bit_1_indices) > 0: # [TO BE REMOVED IN PHASE 1]
return False
total_attesting_indices = len(custody_bit_0_indices + custody_bit_1_indices)
total_attesting_indices = len(custody_bit_0_indices) + len(custody_bit_1_indices)
if not (1 <= total_attesting_indices <= MAX_ATTESTATION_PARTICIPANTS):
return False