diff --git a/consensus/state_processing/src/per_block_processing.rs b/consensus/state_processing/src/per_block_processing.rs index 0f67dd95f8..05621d188b 100644 --- a/consensus/state_processing/src/per_block_processing.rs +++ b/consensus/state_processing/src/per_block_processing.rs @@ -566,7 +566,7 @@ pub fn get_expected_withdrawals( index: withdrawal_index, validator_index, address: validator - .get_eth1_withdrawal_address(spec) + .get_execution_withdrawal_address(spec) .ok_or(BlockProcessingError::WithdrawalCredentialsInvalid)?, amount: balance, }); @@ -576,7 +576,7 @@ pub fn get_expected_withdrawals( index: withdrawal_index, validator_index, address: validator - .get_eth1_withdrawal_address(spec) + .get_execution_withdrawal_address(spec) .ok_or(BlockProcessingError::WithdrawalCredentialsInvalid)?, amount: balance.safe_sub( validator diff --git a/consensus/types/src/validator.rs b/consensus/types/src/validator.rs index 82d0ad311b..b5753a6b94 100644 --- a/consensus/types/src/validator.rs +++ b/consensus/types/src/validator.rs @@ -140,18 +140,6 @@ impl Validator { is_compounding_withdrawal_credential(self.withdrawal_credentials, spec) } - /// Get the eth1 withdrawal address if this validator has one initialized. - pub fn get_eth1_withdrawal_address(&self, spec: &ChainSpec) -> Option
{ - self.has_eth1_withdrawal_credential(spec) - .then(|| { - self.withdrawal_credentials - .as_bytes() - .get(12..) - .map(Address::from_slice) - }) - .flatten() - } - /// Get the execution withdrawal address if this validator has one initialized. pub fn get_execution_withdrawal_address(&self, spec: &ChainSpec) -> Option
{ self.has_execution_withdrawal_credential(spec)