mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-12 11:44:41 +00:00
Use spec function for total active balance
This commit is contained in:
parent
fb4a4f6694
commit
064b489d18
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user