pub fn produce_signed_aggregate_and_proof(
        &self,
        validator_pubkey: &PublicKeyBytes,
        validator_index: u64,
        aggregate: Attestation<E>,
        selection_proof: SelectionProof,
    ) -> Option<SignedAggregateAndProof<E>> {
        let validators = self.validators.read();
        let voting_keypair = &validators.voting_keypair(validator_pubkey)?;

        metrics::inc_counter_vec(&metrics::SIGNED_AGGREGATES_TOTAL, &[metrics::SUCCESS]);

        Some(SignedAggregateAndProof::from_aggregate(
            validator_index,
            aggregate,
            Some(selection_proof),
            &voting_keypair.sk,
            &self.fork(),
            self.genesis_validators_root,
            &self.spec,
        ))
    }
/// Signs an `AggregateAndProof` for a given validator.
///
/// The resulting `SignedAggregateAndProof` is sent on the aggregation channel and cannot be
/// modified by actors other than the signing validator.
Signs an `AggregateAndProof` for a given validator.
The resulting `SignedAggregateAndProof` is sent on the aggregation channel and cannot be
modified by actors other than the signing validator.
Signs an ` AggregateAndProof ` for a given validator . The resulting ` SignedAggregateAndProof ` is sent on the aggregation channel and cannot be modified by actors other than the signing validator .
pub fn produce_signed_aggregate_and_proof(
        &self,
        validator_pubkey: &PublicKeyBytes,
        validator_index: u64,
        aggregate: Attestation<E>,
        selection_proof: SelectionProof,
    ) -> Option<SignedAggregateAndProof<E>> {
        let validators = self.validators.read();
        let voting_keypair = &validators.voting_keypair(validator_pubkey)?;
        metrics::inc_counter_vec(&metrics::SIGNED_AGGREGATES_TOTAL, &[metrics::SUCCESS]);
        Some(SignedAggregateAndProof::from_aggregate(
            validator_index,
            aggregate,
            Some(selection_proof),
            &voting_keypair.sk,
            &self.fork(),
            self.genesis_validators_root,
            &self.spec,
        ))
    }
pub fn produce_signed_aggregate_and_proof ( & self , validator_pubkey : & PublicKeyBytes , validator_index : u64 , aggregate : Attestation < E > , selection_proof : SelectionProof , ) -> Option < SignedAggregateAndProof < E > > { let validators = self . validators . read ( ) ; let voting_keypair = & validators . voting_keypair ( validator_pubkey ) ? ; metrics :: inc_counter_vec ( & metrics :: SIGNED_AGGREGATES_TOTAL , & [ metrics :: SUCCESS ] ) ; Some ( SignedAggregateAndProof :: from_aggregate ( validator_index , aggregate , Some ( selection_proof ) , & voting_keypair . sk , & self . fork ( ) , self . genesis_validators_root , & self . spec , ) ) }
Signs an `AggregateAndProof` for a given validator.
Signs an ` AggregateAndProof ` for a given validator .
&self
validator_pubkey
&PublicKeyBytes
validator_index
u64
aggregate
Attestation<E>
selection_proof
SelectionProof