pub fn add_to_block_inclusion_pool(
        &self,
        signed_aggregate: VerifiedAggregatedAttestation<T>,
    ) -> Result<VerifiedAggregatedAttestation<T>, AttestationError> {
        let _timer = metrics::start_timer(&metrics::ATTESTATION_PROCESSING_APPLY_TO_OP_POOL);

        // If there's no eth1 chain then it's impossible to produce blocks and therefore
        // useless to put things in the op pool.
        if self.eth1_chain.is_some() {
            let fork = self
                .canonical_head
                .try_read_for(HEAD_LOCK_TIMEOUT)
                .ok_or(Error::CanonicalHeadLockTimeout)?
                .beacon_state
                .fork;

            self.op_pool
                .insert_attestation(
                    // TODO: address this clone.
                    signed_aggregate.attestation().clone(),
                    &fork,
                    self.genesis_validators_root,
                    &self.spec,
                )
                .map_err(Error::from)?;
        }

        Ok(signed_aggregate)
    }
/// Accepts a `VerifiedAggregatedAttestation` and attempts to apply it to `self.op_pool`.
///
/// The op pool is used by local block producers to pack blocks with operations.
Accepts a `VerifiedAggregatedAttestation` and attempts to apply it to `self.op_pool`.
The op pool is used by local block producers to pack blocks with operations.
Accepts a ` VerifiedAggregatedAttestation ` and attempts to apply it to ` self . op_pool ` . The op pool is used by local block producers to pack blocks with operations .
pub fn add_to_block_inclusion_pool(
        &self,
        signed_aggregate: VerifiedAggregatedAttestation<T>,
    ) -> Result<VerifiedAggregatedAttestation<T>, AttestationError> {
        let _timer = metrics::start_timer(&metrics::ATTESTATION_PROCESSING_APPLY_TO_OP_POOL);
        // If there's no eth1 chain then it's impossible to produce blocks and therefore
        // useless to put things in the op pool.
        if self.eth1_chain.is_some() {
            let fork = self
                .canonical_head
                .try_read_for(HEAD_LOCK_TIMEOUT)
                .ok_or(Error::CanonicalHeadLockTimeout)?
                .beacon_state
                .fork;
            self.op_pool
                .insert_attestation(
                    // TODO: address this clone.
                    signed_aggregate.attestation().clone(),
                    &fork,
                    self.genesis_validators_root,
                    &self.spec,
                )
                .map_err(Error::from)?;
        }
        Ok(signed_aggregate)
    }
pub fn add_to_block_inclusion_pool ( & self , signed_aggregate : VerifiedAggregatedAttestation < T > , ) -> Result < VerifiedAggregatedAttestation < T > , AttestationError > { let _timer = metrics :: start_timer ( & metrics :: ATTESTATION_PROCESSING_APPLY_TO_OP_POOL ) ; // If there's no eth1 chain then it's impossible to produce blocks and therefore // useless to put things in the op pool. if self . eth1_chain . is_some ( ) { let fork = self . canonical_head . try_read_for ( HEAD_LOCK_TIMEOUT ) . ok_or ( Error :: CanonicalHeadLockTimeout ) ? . beacon_state . fork ; self . op_pool . insert_attestation ( // TODO: address this clone. signed_aggregate . attestation ( ) . clone ( ) , & fork , self . genesis_validators_root , & self . spec , ) . map_err ( Error :: from ) ? ; } Ok ( signed_aggregate ) }
Accepts a `VerifiedAggregatedAttestation` and attempts to apply it to `self.op_pool`.
Accepts a ` VerifiedAggregatedAttestation ` and attempts to apply it to ` self . op_pool ` .
&self
signed_aggregate
VerifiedAggregatedAttestation<T>