From 3977b92c49047087d8b93a46dd8d3229d2214233 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Wed, 19 Jun 2024 13:45:47 -0400 Subject: [PATCH] remove dup method `get_indexed_attestation_from_committees` --- .../src/attestation_verification.rs | 2 +- .../src/common/get_attesting_indices.rs | 19 +------------------ 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/beacon_node/beacon_chain/src/attestation_verification.rs b/beacon_node/beacon_chain/src/attestation_verification.rs index 51b5b11b09a..6044cafd6e0 100644 --- a/beacon_node/beacon_chain/src/attestation_verification.rs +++ b/beacon_node/beacon_chain/src/attestation_verification.rs @@ -650,7 +650,7 @@ impl<'a, T: BeaconChainTypes> IndexedAggregatedAttestation<'a, T> { .map_err(|e| BeaconChainError::from(e).into()) } SignedAggregateAndProof::Electra(signed_aggregate) => { - attesting_indices_electra::get_indexed_attestation_from_committees( + attesting_indices_electra::get_indexed_attestation( &committees, &signed_aggregate.message.aggregate, ) diff --git a/consensus/state_processing/src/common/get_attesting_indices.rs b/consensus/state_processing/src/common/get_attesting_indices.rs index 06571009995..457a5261041 100644 --- a/consensus/state_processing/src/common/get_attesting_indices.rs +++ b/consensus/state_processing/src/common/get_attesting_indices.rs @@ -76,24 +76,7 @@ pub mod attesting_indices_electra { attestation: &AttestationElectra, ) -> Result, BlockOperationError> { let committees = beacon_state.get_beacon_committees_at_slot(attestation.data.slot)?; - get_indexed_attestation_from_committees(&committees, attestation) - } - - pub fn get_indexed_attestation_from_committees( - committees: &[BeaconCommittee], - attestation: &AttestationElectra, - ) -> Result, BlockOperationError> { - let attesting_indices = get_attesting_indices::( - committees, - &attestation.aggregation_bits, - &attestation.committee_bits, - )?; - - Ok(IndexedAttestation::Electra(IndexedAttestationElectra { - attesting_indices: VariableList::new(attesting_indices)?, - data: attestation.data.clone(), - signature: attestation.signature.clone(), - })) + get_indexed_attestation(&committees, attestation) } /// Shortcut for getting the attesting indices while fetching the committee from the state's cache.