fn crypto_verify_dealing_support(
        &self,
        id: &EcdsaMessageId,
        transcript_params: &IDkgTranscriptParams,
        support: &EcdsaDealingSupport,
    ) -> EcdsaChangeSet {
        let dealing = &support.content;
        self.crypto
            .verify(support, transcript_params.registry_version())
            .map_or_else(
                |error| {
                    self.metrics.pre_sign_errors_inc("verify_dealing_support");
                    vec![EcdsaChangeAction::HandleInvalid(
                        id.clone(),
                        format!(
                            "Support validation failed: dealer = {:?},
                          height = {:?}, transcript_id = {:?}, signer = {:?}, error = {:?}",
                            dealing.idkg_dealing.dealer_id,
                            dealing.requested_height,
                            dealing.idkg_dealing.transcript_id,
                            support.signature.signer,
                            error
                        ),
                    )]
                },
                |_| {
                    self.metrics
                        .pre_sign_metrics_inc("dealing_support_received");
                    vec![EcdsaChangeAction::MoveToValidated(id.clone())]
                },
            )
    }
/// Helper to verify a support share for a dealing
Helper to verify a support share for a dealing
Helper to verify a support share for a dealing
fn crypto_verify_dealing_support(
        &self,
        id: &EcdsaMessageId,
        transcript_params: &IDkgTranscriptParams,
        support: &EcdsaDealingSupport,
    ) -> EcdsaChangeSet {
        let dealing = &support.content;
        self.crypto
            .verify(support, transcript_params.registry_version())
            .map_or_else(
                |error| {
                    self.metrics.pre_sign_errors_inc("verify_dealing_support");
                    vec![EcdsaChangeAction::HandleInvalid(
                        id.clone(),
                        format!(
                            "Support validation failed: dealer = {:?},
                          height = {:?}, transcript_id = {:?}, signer = {:?}, error = {:?}",
                            dealing.idkg_dealing.dealer_id,
                            dealing.requested_height,
                            dealing.idkg_dealing.transcript_id,
                            support.signature.signer,
                            error
                        ),
                    )]
                },
                |_| {
                    self.metrics
                        .pre_sign_metrics_inc("dealing_support_received");
                    vec![EcdsaChangeAction::MoveToValidated(id.clone())]
                },
            )
    }
fn crypto_verify_dealing_support ( & self , id : & EcdsaMessageId , transcript_params : & IDkgTranscriptParams , support : & EcdsaDealingSupport , ) -> EcdsaChangeSet { let dealing = & support . content ; self . crypto . verify ( support , transcript_params . registry_version ( ) ) . map_or_else ( | error | { self . metrics . pre_sign_errors_inc ( " " ) ; vec ! [ EcdsaChangeAction HandleInvalid ( id clone ( ) format ( " " dealing idkg_dealing dealer_id dealing requested_height dealing idkg_dealing transcript_id support signature signer error ) ) ] } , | _ | { self . metrics . pre_sign_metrics_inc ( " " ) ; vec ! [ EcdsaChangeAction MoveToValidated ( id clone ( ) ) ] } , ) }
Helper to verify a support share for a dealing
Helper to verify a support share for a dealing
&self
id
&EcdsaMessageId
transcript_params
&IDkgTranscriptParams
support
&EcdsaDealingSupport
&self
id
&EcdsaMessageId
transcript_params
&IDkgTranscriptParams
support
&EcdsaDealingSupport