This commit is contained in:
Mikhail Kalinin 2024-05-31 22:16:18 +06:00
parent eb0cdc72e8
commit a0a23245f0
1 changed files with 2 additions and 1 deletions

View File

@ -1442,7 +1442,8 @@ def initialize_beacon_state_from_eth1(eth1_block_hash: Hash32,
# Process activations
for index, validator in enumerate(state.validators):
balance = state.balances[index]
validator.effective_balance = min(balance - balance % EFFECTIVE_BALANCE_INCREMENT, MAX_EFFECTIVE_BALANCE_ELECTRA)
validator.effective_balance = min(
balance - balance % EFFECTIVE_BALANCE_INCREMENT, MAX_EFFECTIVE_BALANCE_ELECTRA)
if validator.effective_balance >= MIN_ACTIVATION_BALANCE:
validator.activation_eligibility_epoch = GENESIS_EPOCH
validator.activation_epoch = GENESIS_EPOCH