diff --git a/tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_attestation.py b/tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_attestation.py index 4c62803be4..2cf314dc5f 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_attestation.py +++ b/tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_attestation.py @@ -358,8 +358,7 @@ def test_invalid_too_few_aggregation_bits(spec, state): next_slots(spec, state, spec.MIN_ATTESTATION_INCLUSION_DELAY) attestation.aggregation_bits = Bitlist[spec.MAX_VALIDATORS_PER_COMMITTEE]( - *([0b1] + [0b0] * (len(attestation.aggregation_bits) - 1)) - ) + *([0b1] + [0b0] * (len(attestation.aggregation_bits) - 1))) sign_attestation(spec, state, attestation) diff --git a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py index 7e64e647aa..9978f7d46c 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py +++ b/tests/core/pyspec/eth2spec/test/phase0/fork_choice/test_ex_ante.py @@ -31,11 +31,6 @@ def _apply_base_block_a(spec, state, store, test_steps): assert spec.get_head(store) == signed_block_a.message.hash_tree_root() -def _get_aggregation_bits(spec, attestation): - aggregation_bits = attestation.aggregation_bits - return aggregation_bits - - @with_altair_and_later @spec_state_test def test_ex_ante_vanilla(spec, state): @@ -83,8 +78,7 @@ def _filter_participant_set(participants): spec, state_b, slot=state_b.slot, signed=False, filter_participant_set=_filter_participant_set ) attestation.data.beacon_block_root = signed_block_b.message.hash_tree_root() - aggregation_bits = _get_aggregation_bits(spec, attestation) - assert len([i for i in aggregation_bits if i == 1]) == 1 + assert len([i for i in attestation.aggregation_bits if i == 1]) == 1 sign_attestation(spec, state_b, attestation) # Block C received at N+2 — C is head @@ -186,8 +180,7 @@ def _filter_participant_set(participants): spec, state_b, slot=state_b.slot, signed=False, filter_participant_set=_filter_participant_set ) attestation.data.beacon_block_root = signed_block_b.message.hash_tree_root() - aggregation_bits = _get_aggregation_bits(spec, attestation) - assert len([i for i in aggregation_bits if i == 1]) == participant_num + assert len([i for i in attestation.aggregation_bits if i == 1]) == participant_num sign_attestation(spec, state_b, attestation) # Attestation_set_1 received at N+2 — B is head because B's attestation_score > C's proposer_score. @@ -311,8 +304,7 @@ def _filter_participant_set(participants): spec, state_c, slot=state_c.slot, signed=False, filter_participant_set=_filter_participant_set ) attestation.data.beacon_block_root = signed_block_c.message.hash_tree_root() - aggregation_bits = _get_aggregation_bits(spec, attestation) - assert len([i for i in aggregation_bits if i == 1]) == 1 + assert len([i for i in attestation.aggregation_bits if i == 1]) == 1 sign_attestation(spec, state_c, attestation) # Block D at slot `N + 3`, parent is B