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)
else:
# Increase balance by deposit amount
index = validator_pubkeys.index(pubkey)
assert state.validator_registry[index].withdrawal_credentials == withdrawal_credentials
state.validator_balances[index] += amount
state.validator_balances[validator_pubkeys.index(pubkey)] += amount
```
### Routines for updating validator status