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:
parent
0f3e0ef2ad
commit
02428ec252
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue