pub fn update_chain_config(
        &self,
        cont: impl FnOnce(&mut toml::Value) -> Result<(), Error>,
    ) -> Result<(), Error> {
        let config1 = self.read_file("config/config.toml")?;

        let mut config2 = toml::from_str(&config1)?;

        cont(&mut config2)?;

        let config3 = toml::to_string_pretty(&config2)?;

        self.write_file("config/config.toml", &config3)?;

        Ok(())
    }
/**
       Modify the Gaia chain config which is saved in toml format.
    */
Modify the Gaia chain config which is saved in toml format.
Modify the Gaia chain config which is saved in toml format .
pub fn update_chain_config(
        &self,
        cont: impl FnOnce(&mut toml::Value) -> Result<(), Error>,
    ) -> Result<(), Error> {
        let config1 = self.read_file("config/config.toml")?;
        let mut config2 = toml::from_str(&config1)?;
        cont(&mut config2)?;
        let config3 = toml::to_string_pretty(&config2)?;
        self.write_file("config/config.toml", &config3)?;
        Ok(())
    }
pub fn update_chain_config ( & self , cont : impl FnOnce ( & mut toml :: Value ) -> Result < ( ) , Error > , ) -> Result < ( ) , Error > { let config1 = self . read_file ( " " ) ? ; let mut config2 = toml :: from_str ( & config1 ) ? ; cont ( & mut config2 ) ? ; let config3 = toml :: to_string_pretty ( & config2 ) ? ; self . write_file ( " " , & config3 ) ? ; Ok ( ( ) ) }
Modify the Gaia chain config which is saved in toml format.
Modify the Gaia chain config which is saved in toml format .
&self
cont
impl FnOnce(&mut toml::Value) -> Result<(), Error>
&self
cont
impl FnOnce(&mut toml::Value) -> Result<(), Error>