mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-02 04:25:12 -05:00
Use spec function for total active balance
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user