From f62167c4abe6fec6784bc937b841aa77a1e5e9b0 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Fri, 15 Oct 2021 00:30:24 +0800 Subject: [PATCH] pr feedback --- .../test/altair/transition/test_activations_and_exits.py | 2 +- tests/core/pyspec/eth2spec/test/helpers/random.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/altair/transition/test_activations_and_exits.py b/tests/core/pyspec/eth2spec/test/altair/transition/test_activations_and_exits.py index 8f4cad2c5..86742042f 100644 --- a/tests/core/pyspec/eth2spec/test/altair/transition/test_activations_and_exits.py +++ b/tests/core/pyspec/eth2spec/test/altair/transition/test_activations_and_exits.py @@ -131,7 +131,7 @@ def test_transition_with_non_empty_activation_queue(state, fork_epoch, spec, pos """ transition_until_fork(spec, state, fork_epoch) - _, queuing_indices = set_some_new_deposits(spec, state, rng=random.Random(5566)) + queuing_indices = set_some_new_deposits(spec, state, rng=random.Random(5566)) assert spec.get_current_epoch(state) < fork_epoch assert len(queuing_indices) > 0 diff --git a/tests/core/pyspec/eth2spec/test/helpers/random.py b/tests/core/pyspec/eth2spec/test/helpers/random.py index 4086431c0..6d51d812e 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/random.py +++ b/tests/core/pyspec/eth2spec/test/helpers/random.py @@ -7,7 +7,6 @@ from eth2spec.test.helpers.state import next_epoch def set_some_new_deposits(spec, state, rng): - eligible_indices = [] queuing_indices = [] num_validators = len(state.validators) # Set ~1/10 to just recently deposited @@ -20,10 +19,9 @@ def set_some_new_deposits(spec, state, rng): # Set ~half of selected to eligible for activation if rng.choice([True, False]): state.validators[index].activation_eligibility_epoch = spec.get_current_epoch(state) - eligible_indices.append(index) else: queuing_indices.append(index) - return eligible_indices, queuing_indices + return queuing_indices def exit_random_validators(spec, state, rng, fraction=None, exit_epoch=None, withdrawable_epoch=None, forward=True):