pub fn load<P: AsRef<Path>>(input_path: P) -> Result<Self> {
        let mut config = Self::load_config(&input_path)?;
        if config.base.role.is_validator() {
            ensure!(
                config.validator_network.is_some(),
                "Missing a validator network config for a validator node"
            );
        } else {
            ensure!(
                config.validator_network.is_none(),
                "Provided a validator network config for a full_node node"
            );
        }

        let input_dir = RootPath::new(input_path);
        config.execution.load(&input_dir)?;
        if let Some(network) = &mut config.validator_network {
            network.load(&input_dir, RoleType::Validator)?;
        }
        for network in &mut config.full_node_networks {
            network.load(&input_dir, RoleType::FullNode)?;
        }
        config.set_data_dir(config.data_dir().clone());
        Ok(config)
    }
/// Reads the config file and returns the configuration object in addition to doing some
/// post-processing of the config
/// Paths used in the config are either absolute or relative to the config location
Reads the config file and returns the configuration object in addition to doing some
post-processing of the config
Paths used in the config are either absolute or relative to the config location
Reads the config file and returns the configuration object in addition to doing some post - processing of the config Paths used in the config are either absolute or relative to the config location
pub fn load<P: AsRef<Path>>(input_path: P) -> Result<Self> {
        let mut config = Self::load_config(&input_path)?;
        if config.base.role.is_validator() {
            ensure!(
                config.validator_network.is_some(),
                "Missing a validator network config for a validator node"
            );
        } else {
            ensure!(
                config.validator_network.is_none(),
                "Provided a validator network config for a full_node node"
            );
        }
        let input_dir = RootPath::new(input_path);
        config.execution.load(&input_dir)?;
        if let Some(network) = &mut config.validator_network {
            network.load(&input_dir, RoleType::Validator)?;
        }
        for network in &mut config.full_node_networks {
            network.load(&input_dir, RoleType::FullNode)?;
        }
        config.set_data_dir(config.data_dir().clone());
        Ok(config)
    }
pub fn load < P : AsRef < Path > > ( input_path : P ) -> Result < Self > { let mut config = Self :: load_config ( & input_path ) ? ; if config . base . role . is_validator ( ) { ensure ! ( config validator_network is_some ( ) " " ) ; } else { ensure ! ( config validator_network is_none ( ) " " ) ; } let input_dir = RootPath :: new ( input_path ) ; config . execution . load ( & input_dir ) ? ; if let Some ( network ) = & mut config . validator_network { network . load ( & input_dir , RoleType :: Validator ) ? ; } for network in & mut config . full_node_networks { network . load ( & input_dir , RoleType :: FullNode ) ? ; } config . set_data_dir ( config . data_dir ( ) . clone ( ) ) ; Ok ( config ) }
Reads the config file and returns the configuration object in addition to doing some
post-processing of the config
Paths used in the config are either absolute or relative to the config location
Reads the config file and returns the configuration object in addition to doing some post - processing of the config Paths used in the config are either absolute or relative to the config location
input_path
P
input_path
P