pub fn load_genesis_file(&self, home: impl AsRef<Path>) -> Result<Genesis, Error> {
        let path = home.as_ref().join(&self.genesis_file);
        let genesis_json = fs::read_to_string(&path)
            .map_err(|e| Error::file_io(format!("{}", path.display()), e))?;

        let res = serde_json::from_str(genesis_json.as_ref()).map_err(Error::serde_json)?;

        Ok(res)
    }
/// Load `genesis.json` file from the configured location
Load `genesis.json` file from the configured location
Load ` genesis . json ` file from the configured location
pub fn load_genesis_file(&self, home: impl AsRef<Path>) -> Result<Genesis, Error> {
        let path = home.as_ref().join(&self.genesis_file);
        let genesis_json = fs::read_to_string(&path)
            .map_err(|e| Error::file_io(format!("{}", path.display()), e))?;
        let res = serde_json::from_str(genesis_json.as_ref()).map_err(Error::serde_json)?;
        Ok(res)
    }
pub fn load_genesis_file ( & self , home : impl AsRef < Path > ) -> Result < Genesis , Error > { let path = home . as_ref ( ) . join ( & self . genesis_file ) ; let genesis_json = fs :: read_to_string ( & path ) . map_err ( | e | Error :: file_io ( format ! ( " " path display ( ) ) , e ) ) ? ; let res = serde_json :: from_str ( genesis_json . as_ref ( ) ) . map_err ( Error :: serde_json ) ? ; Ok ( res ) }
Load `genesis.json` file from the configured location
Load ` genesis . json ` file from the configured location
&self
home
impl AsRef<Path>