From 9deda149da900da8196dd1271dccb205840fe0e7 Mon Sep 17 00:00:00 2001 From: protolambda Date: Thu, 24 Oct 2019 00:00:27 +0800 Subject: [PATCH] fix list lookup --- .../epoch_processing/test_process_rewards_and_penalties.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_libs/pyspec/eth2spec/test/phase_0/epoch_processing/test_process_rewards_and_penalties.py b/test_libs/pyspec/eth2spec/test/phase_0/epoch_processing/test_process_rewards_and_penalties.py index e8be79aaf..b4bcc7425 100644 --- a/test_libs/pyspec/eth2spec/test/phase_0/epoch_processing/test_process_rewards_and_penalties.py +++ b/test_libs/pyspec/eth2spec/test/phase_0/epoch_processing/test_process_rewards_and_penalties.py @@ -183,11 +183,11 @@ def test_attestations_some_slashed(spec, state): add_attestations_to_state(spec, state, [include_att], state.slot) next_slot(spec, state) - attesting_indices_before_slashings = spec.get_unslashed_attesting_indices(state, attestations) + attesting_indices_before_slashings = list(spec.get_unslashed_attesting_indices(state, attestations)) # Slash maximum amount of validators allowed per epoch. for i in range(spec.MIN_PER_EPOCH_CHURN_LIMIT): - spec.slash_validator(state, list(attesting_indices_before_slashings)[i]) + spec.slash_validator(state, attesting_indices_before_slashings[i]) assert spec.compute_epoch_of_slot(state.slot) == spec.GENESIS_EPOCH + 1 assert len(state.previous_epoch_attestations) == spec.SLOTS_PER_EPOCH