Merge pull request #1738 from ethereum/JustinDrake-patch-3
Fix #1735—remove redundant check
This commit is contained in:
commit
5cb6ec9471
|
@ -684,14 +684,10 @@ def is_slashable_attestation_data(data_1: AttestationData, data_2: AttestationDa
|
||||||
```python
|
```python
|
||||||
def is_valid_indexed_attestation(state: BeaconState, indexed_attestation: IndexedAttestation) -> bool:
|
def is_valid_indexed_attestation(state: BeaconState, indexed_attestation: IndexedAttestation) -> bool:
|
||||||
"""
|
"""
|
||||||
Check if ``indexed_attestation`` has valid indices and signature.
|
Check if ``indexed_attestation`` has sorted and unique indices and a valid aggregate signature.
|
||||||
"""
|
"""
|
||||||
indices = indexed_attestation.attesting_indices
|
|
||||||
|
|
||||||
# Verify max number of indices
|
|
||||||
if not len(indices) <= MAX_VALIDATORS_PER_COMMITTEE:
|
|
||||||
return False
|
|
||||||
# Verify indices are sorted and unique
|
# Verify indices are sorted and unique
|
||||||
|
indices = indexed_attestation.attesting_indices
|
||||||
if not indices == sorted(set(indices)):
|
if not indices == sorted(set(indices)):
|
||||||
return False
|
return False
|
||||||
# Verify aggregate signature
|
# Verify aggregate signature
|
||||||
|
|
Loading…
Reference in New Issue