From 064b489d18504e796adc4661cd4d641456dfd0a8 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Tue, 7 Sep 2021 12:23:57 -0700 Subject: [PATCH] Use spec function for total active balance --- tests/core/pyspec/eth2spec/test/helpers/state.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/helpers/state.py b/tests/core/pyspec/eth2spec/test/helpers/state.py index 327bebaf8..6f1923e54 100644 --- a/tests/core/pyspec/eth2spec/test/helpers/state.py +++ b/tests/core/pyspec/eth2spec/test/helpers/state.py @@ -162,8 +162,6 @@ def has_active_balance_differential(spec, state): Ensure there is a difference between the total balance of all _active_ validators and _all_ validators. """ - epoch = spec.get_current_epoch(state) - active_indices = spec.get_active_validator_indices(state, epoch) - active_balance = spec.get_total_balance(state, set(active_indices)) + active_balance = spec.get_total_active_balance(state) total_balance = spec.get_total_balance(state, set(range(len(state.validators)))) return active_balance // spec.EFFECTIVE_BALANCE_INCREMENT != total_balance // spec.EFFECTIVE_BALANCE_INCREMENT