/// Set fields (that were not provided by the user explicitly) to defaults.
Set fields (that were not provided by the user explicitly) to defaults.
Set fields ( that were not provided by the user explicitly ) to defaults .
fn apply_defaults_for_unset_fields(&mut self) {
        let subnet_config =
            subnet_configuration::get_default_config_params(self.subnet_type, self.node_ids.len());
        let gossip_config = p2p::build_default_gossip_config();
        // set subnet params
        self.ingress_bytes_per_block_soft_cap
            .get_or_insert(subnet_config.ingress_bytes_per_block_soft_cap);
        self.max_ingress_bytes_per_message
            .get_or_insert(subnet_config.max_ingress_bytes_per_message);
        self.max_ingress_messages_per_block
            .get_or_insert(subnet_config.max_ingress_messages_per_block);
        self.max_block_payload_size
            .get_or_insert(subnet_config.max_block_payload_size);
        self.unit_delay_millis
            .get_or_insert(subnet_config.unit_delay.as_millis() as u64);
        self.initial_notary_delay_millis
            .get_or_insert(subnet_config.initial_notary_delay.as_millis() as u64);
        self.dkg_dealings_per_block
            .get_or_insert(subnet_config.dkg_dealings_per_block as u64);
        self.dkg_interval_length
            .get_or_insert(subnet_config.dkg_interval_length.get());
        // set gossip params
        self.gossip_max_artifact_streams_per_peer
            .get_or_insert(gossip_config.max_artifact_streams_per_peer);
        self.gossip_max_chunk_wait_ms
            .get_or_insert(gossip_config.max_chunk_wait_ms);
        self.gossip_max_duplicity
            .get_or_insert(gossip_config.max_duplicity);
        self.gossip_max_chunk_size
            .get_or_insert(gossip_config.max_chunk_size);
        self.gossip_receive_check_cache_size
            .get_or_insert(gossip_config.receive_check_cache_size);
        self.gossip_pfn_evaluation_period_ms
            .get_or_insert(gossip_config.pfn_evaluation_period_ms);
        self.gossip_registry_poll_period_ms
            .get_or_insert(gossip_config.registry_poll_period_ms);
        self.gossip_retransmission_request_ms
            .get_or_insert(gossip_config.retransmission_request_ms);
    }
fn apply_defaults_for_unset_fields ( & mut self ) { let subnet_config = subnet_configuration :: get_default_config_params ( self . subnet_type , self . node_ids . len ( ) ) ; let gossip_config = p2p :: build_default_gossip_config ( ) ; // set subnet params self . ingress_bytes_per_block_soft_cap . get_or_insert ( subnet_config . ingress_bytes_per_block_soft_cap ) ; self . max_ingress_bytes_per_message . get_or_insert ( subnet_config . max_ingress_bytes_per_message ) ; self . max_ingress_messages_per_block . get_or_insert ( subnet_config . max_ingress_messages_per_block ) ; self . max_block_payload_size . get_or_insert ( subnet_config . max_block_payload_size ) ; self . unit_delay_millis . get_or_insert ( subnet_config . unit_delay . as_millis ( ) as u64 ) ; self . initial_notary_delay_millis . get_or_insert ( subnet_config . initial_notary_delay . as_millis ( ) as u64 ) ; self . dkg_dealings_per_block . get_or_insert ( subnet_config . dkg_dealings_per_block as u64 ) ; self . dkg_interval_length . get_or_insert ( subnet_config . dkg_interval_length . get ( ) ) ; // set gossip params self . gossip_max_artifact_streams_per_peer . get_or_insert ( gossip_config . max_artifact_streams_per_peer ) ; self . gossip_max_chunk_wait_ms . get_or_insert ( gossip_config . max_chunk_wait_ms ) ; self . gossip_max_duplicity . get_or_insert ( gossip_config . max_duplicity ) ; self . gossip_max_chunk_size . get_or_insert ( gossip_config . max_chunk_size ) ; self . gossip_receive_check_cache_size . get_or_insert ( gossip_config . receive_check_cache_size ) ; self . gossip_pfn_evaluation_period_ms . get_or_insert ( gossip_config . pfn_evaluation_period_ms ) ; self . gossip_registry_poll_period_ms . get_or_insert ( gossip_config . registry_poll_period_ms ) ; self . gossip_retransmission_request_ms . get_or_insert ( gossip_config . retransmission_request_ms ) ; }
Set fields (that were not provided by the user explicitly) to defaults.
Set fields ( that were not provided by the user explicitly ) to defaults .
&mut self