pub fn verify_unaggregated_attestation_for_gossip(
        &self,
        unaggregated_attestation: Attestation<T::EthSpec>,
        subnet_id: Option<SubnetId>,
    ) -> Result<VerifiedUnaggregatedAttestation<T>, AttestationError> {
        metrics::inc_counter(&metrics::UNAGGREGATED_ATTESTATION_PROCESSING_REQUESTS);
        let _timer =
            metrics::start_timer(&metrics::UNAGGREGATED_ATTESTATION_GOSSIP_VERIFICATION_TIMES);

        VerifiedUnaggregatedAttestation::verify(unaggregated_attestation, subnet_id, self).map(
            |v| {
                // This method is called for API and gossip attestations, so this covers all unaggregated attestation events
                if let Some(event_handler) = self.event_handler.as_ref() {
                    if event_handler.has_attestation_subscribers() {
                        event_handler.register(EventKind::Attestation(v.attestation().clone()));
                    }
                }
                metrics::inc_counter(&metrics::UNAGGREGATED_ATTESTATION_PROCESSING_SUCCESSES);
                v
            },
        )
    }
/// Accepts some `Attestation` from the network and attempts to verify it, returning `Ok(_)` if
/// it is valid to be (re)broadcast on the gossip network.
///
/// The attestation must be "unaggregated", that is it must have exactly one
/// aggregation bit set.
Accepts some `Attestation` from the network and attempts to verify it, returning `Ok(_)` if
it is valid to be (re)broadcast on the gossip network.

The attestation must be "unaggregated", that is it must have exactly one
aggregation bit set.
Accepts some ` Attestation ` from the network and attempts to verify it returning ` Ok ( _ ) ` if it is valid to be ( re ) broadcast on the gossip network . The attestation must be " unaggregated " that is it must have exactly one aggregation bit set .
pub fn verify_unaggregated_attestation_for_gossip(
        &self,
        unaggregated_attestation: Attestation<T::EthSpec>,
        subnet_id: Option<SubnetId>,
    ) -> Result<VerifiedUnaggregatedAttestation<T>, AttestationError> {
        metrics::inc_counter(&metrics::UNAGGREGATED_ATTESTATION_PROCESSING_REQUESTS);
        let _timer =
            metrics::start_timer(&metrics::UNAGGREGATED_ATTESTATION_GOSSIP_VERIFICATION_TIMES);
        VerifiedUnaggregatedAttestation::verify(unaggregated_attestation, subnet_id, self).map(
            |v| {
                // This method is called for API and gossip attestations, so this covers all unaggregated attestation events
                if let Some(event_handler) = self.event_handler.as_ref() {
                    if event_handler.has_attestation_subscribers() {
                        event_handler.register(EventKind::Attestation(v.attestation().clone()));
                    }
                }
                metrics::inc_counter(&metrics::UNAGGREGATED_ATTESTATION_PROCESSING_SUCCESSES);
                v
            },
        )
    }
pub fn verify_unaggregated_attestation_for_gossip ( & self , unaggregated_attestation : Attestation < T :: EthSpec > , subnet_id : Option < SubnetId > , ) -> Result < VerifiedUnaggregatedAttestation < T > , AttestationError > { metrics :: inc_counter ( & metrics :: UNAGGREGATED_ATTESTATION_PROCESSING_REQUESTS ) ; let _timer = metrics :: start_timer ( & metrics :: UNAGGREGATED_ATTESTATION_GOSSIP_VERIFICATION_TIMES ) ; VerifiedUnaggregatedAttestation :: verify ( unaggregated_attestation , subnet_id , self ) . map ( | v | { // This method is called for API and gossip attestations, so this covers all unaggregated attestation events if let Some ( event_handler ) = self . event_handler . as_ref ( ) { if event_handler . has_attestation_subscribers ( ) { event_handler . register ( EventKind :: Attestation ( v . attestation ( ) . clone ( ) ) ) ; } } metrics :: inc_counter ( & metrics :: UNAGGREGATED_ATTESTATION_PROCESSING_SUCCESSES ) ; v } , ) }
Accepts some `Attestation` from the network and attempts to verify it, returning `Ok(_)` if
it is valid to be (re)broadcast on the gossip network.
Accepts some ` Attestation ` from the network and attempts to verify it returning ` Ok ( _ ) ` if it is valid to be ( re ) broadcast on the gossip network .
&self
unaggregated_attestation
Attestation<T::EthSpec>
subnet_id
Option<SubnetId>