Do not check withdrawal credentials for existing validators

We should not invalidate blocks that contain a deposit with an inconsistent withdrawal credential as that would stall the chain.
This commit is contained in:
Justin 2019-03-10 13:25:57 +01:00 committed by GitHub
parent 0f3e0ef2ad
commit 02428ec252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -1341,10 +1341,7 @@ def process_deposit(state: BeaconState, deposit: Deposit) -> None:
state.validator_balances.append(amount) state.validator_balances.append(amount)
else: else:
# Increase balance by deposit amount # Increase balance by deposit amount
index = validator_pubkeys.index(pubkey) state.validator_balances[validator_pubkeys.index(pubkey)] += amount
assert state.validator_registry[index].withdrawal_credentials == withdrawal_credentials
state.validator_balances[index] += amount
``` ```
### Routines for updating validator status ### Routines for updating validator status