one more hf-1 to Altair conversion

This commit is contained in:
Danny Ryan 2021-03-11 08:55:55 -07:00
parent b44e576e95
commit b9c95b722d
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 2 additions and 3 deletions

View File

@ -519,9 +519,8 @@ def process_deposit(state: BeaconState, deposit: Deposit) -> None:
# Add validator and balance entries # Add validator and balance entries
state.validators.append(get_validator_from_deposit(state, deposit)) state.validators.append(get_validator_from_deposit(state, deposit))
state.balances.append(amount) state.balances.append(amount)
# [Added in hf-1] Initialize empty participation flags for new validator state.previous_epoch_participation.append(ParticipationFlags(0b0000_0000)) # [New in Altair]
state.previous_epoch_participation.append(ParticipationFlags(0b0000_0000)) state.current_epoch_participation.append(ParticipationFlags(0b0000_0000)) # [New in Altair]
state.current_epoch_participation.append(ParticipationFlags(0b0000_0000))
else: else:
# Increase balance by deposit amount # Increase balance by deposit amount
index = ValidatorIndex(validator_pubkeys.index(pubkey)) index = ValidatorIndex(validator_pubkeys.index(pubkey))