Update beacon-chain.md

This commit is contained in:
Alex Stokes 2024-04-08 16:28:17 -06:00 committed by GitHub
parent dd2721f3c6
commit 3cf3e21504
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -222,7 +222,10 @@ def process_operations(state: BeaconState, body: BeaconBlockBody) -> None:
```python ```python
def process_execution_layer_exit(state: BeaconState, execution_layer_exit: ExecutionLayerExit) -> None: def process_execution_layer_exit(state: BeaconState, execution_layer_exit: ExecutionLayerExit) -> None:
validator_pubkeys = [v.pubkey for v in state.validators] validator_pubkeys = [v.pubkey for v in state.validators]
validator_index = ValidatorIndex(validator_pubkeys.index(execution_layer_exit.validator_pubkey)) pubkey_to_exit = execution_layer_exit.validator_pubkey
if pubkey_to_exit not in validator_pubkeys:
return
validator_index = ValidatorIndex(validator_pubkeys.index(pubkey_to_exit))
validator = state.validators[validator_index] validator = state.validators[validator_index]
# Verify withdrawal credentials # Verify withdrawal credentials