From 3cf3e21504a661b8af9ab744f83ffac8b2fd4ec4 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Mon, 8 Apr 2024 16:28:17 -0600 Subject: [PATCH] Update beacon-chain.md --- specs/_features/eip7002/beacon-chain.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specs/_features/eip7002/beacon-chain.md b/specs/_features/eip7002/beacon-chain.md index 39b03e878..58af0d540 100644 --- a/specs/_features/eip7002/beacon-chain.md +++ b/specs/_features/eip7002/beacon-chain.md @@ -222,7 +222,10 @@ def process_operations(state: BeaconState, body: BeaconBlockBody) -> None: ```python def process_execution_layer_exit(state: BeaconState, execution_layer_exit: ExecutionLayerExit) -> None: 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] # Verify withdrawal credentials