Merge pull request #392 from ralexstokes/fix-units-ejection-balance

Fix a type error with units of wei when determining ejection balance.
This commit is contained in:
Danny Ryan 2019-01-03 21:44:08 -07:00 committed by GitHub
commit a84dd398e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1690,7 +1690,7 @@ def process_ejections(state: BeaconState) -> None:
and eject active validators with balance below ``EJECTION_BALANCE``. and eject active validators with balance below ``EJECTION_BALANCE``.
""" """
for index in active_validator_indices(state.validator_registry): for index in active_validator_indices(state.validator_registry):
if state.validator_balances[index] < EJECTION_BALANCE: if state.validator_balances[index] < EJECTION_BALANCE * GWEI_PER_ETH:
update_validator_status(state, index, new_status=EXITED_WITHOUT_PENALTY) update_validator_status(state, index, new_status=EXITED_WITHOUT_PENALTY)
``` ```