/// Adds a crypto component and a registry entry for a node
Adds a crypto component and a registry entry for a node
Adds a crypto component and a registry entry for a node
fn add_crypto_component_and_registry_entry(
        &mut self,
        ni_dkg_config: &NiDkgConfig,
        node_id: NodeId,
    ) {
        // Insert TempCryptoComponent
        let registry = Arc::clone(&self.registry) as Arc<_>;
        let (temp_crypto, dkg_dealing_encryption_pubkey) =
            TempCryptoComponent::new_with_ni_dkg_dealing_encryption_key_generation(
                registry, node_id,
            );
        self.crypto_components.insert(node_id, temp_crypto);
        // Insert DKG dealing encryption public key into registry
        self.registry_data
            .add(
                &make_crypto_node_key(node_id, KeyPurpose::DkgDealingEncryption),
                ni_dkg_config.registry_version(),
                Some(dkg_dealing_encryption_pubkey),
            )
            .expect("failed to add DKG dealing encryption key to registry");
    }
fn add_crypto_component_and_registry_entry ( & mut self , ni_dkg_config : & NiDkgConfig , node_id : NodeId , ) { // Insert TempCryptoComponent let registry = Arc :: clone ( & self . registry ) as Arc < _ > ; let ( temp_crypto , dkg_dealing_encryption_pubkey ) = TempCryptoComponent :: new_with_ni_dkg_dealing_encryption_key_generation ( registry , node_id , ) ; self . crypto_components . insert ( node_id , temp_crypto ) ; // Insert DKG dealing encryption public key into registry self . registry_data . add ( & make_crypto_node_key ( node_id , KeyPurpose :: DkgDealingEncryption ) , ni_dkg_config . registry_version ( ) , Some ( dkg_dealing_encryption_pubkey ) , ) . expect ( " " ) ; }
Adds a crypto component and a registry entry for a node
Adds a crypto component and a registry entry for a node
&mut self
ni_dkg_config
&NiDkgConfig
node_id
NodeId