Fix genesis balance bug (git add -u)

This commit is contained in:
Justin Drake 2019-06-29 21:36:27 +01:00
parent 3a5872f8e4
commit ada3cb2ae1
1 changed files with 2 additions and 2 deletions

View File

@ -1120,8 +1120,8 @@ def get_genesis_beacon_state(eth1_block_hash: Hash, eth1_timestamp: int, deposit
process_deposit(state, deposit) process_deposit(state, deposit)
# Process activations # Process activations
for validator in state.validators: for index, validator in enumerate(state.validators):
if validator.effective_balance == MAX_EFFECTIVE_BALANCE: if balances[index] >= MAX_EFFECTIVE_BALANCE:
validator.activation_eligibility_epoch = GENESIS_EPOCH validator.activation_eligibility_epoch = GENESIS_EPOCH
validator.activation_epoch = GENESIS_EPOCH validator.activation_epoch = GENESIS_EPOCH
assert len(get_active_validator_indices(state, GENESIS_EPOCH)) >= MIN_MIN_GENESIS_ACTIVE_VALIDATOR_COUNT assert len(get_active_validator_indices(state, GENESIS_EPOCH)) >= MIN_MIN_GENESIS_ACTIVE_VALIDATOR_COUNT