Remove gaia (#4347)
Gaia is removed from cosmos-sdk repository. Few changes were required to make sure no packages depend on gaia subpackages. CI config is amended accordingly. Unnecessary targets are removed from Makefile. Simulations run through a lightweight version of gaia renamed to simapp. Closes: #4104
This commit is contained in:
@@ -27,13 +27,14 @@ var configTemplate *template.Template
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
tmpl := template.New("gaiaConfigFileTemplate")
|
||||
tmpl := template.New("appConfigFileTemplate")
|
||||
if configTemplate, err = tmpl.Parse(defaultConfigTemplate); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// ParseConfig retrieves the default environment configuration for Gaia.
|
||||
// ParseConfig retrieves the default environment configuration for the
|
||||
// application.
|
||||
func ParseConfig() (*Config, error) {
|
||||
conf := DefaultConfig()
|
||||
err := viper.Unmarshal(conf)
|
||||
|
||||
+5
-9
@@ -105,17 +105,13 @@ func interceptLoadConfig() (conf *cfg.Config, err error) {
|
||||
conf, err = tcmd.ParseConfig() // NOTE: ParseConfig() creates dir/files as necessary.
|
||||
}
|
||||
|
||||
// create a default Gaia config file if it does not exist
|
||||
//
|
||||
// TODO: Rename config file to server.toml as it's not particular to Gaia
|
||||
// (REF: https://github.com/cosmos/cosmos-sdk/issues/4125).
|
||||
gaiaConfigFilePath := filepath.Join(rootDir, "config/gaiad.toml")
|
||||
if _, err := os.Stat(gaiaConfigFilePath); os.IsNotExist(err) {
|
||||
gaiaConf, _ := config.ParseConfig()
|
||||
config.WriteConfigFile(gaiaConfigFilePath, gaiaConf)
|
||||
appConfigFilePath := filepath.Join(rootDir, "config/app.toml")
|
||||
if _, err := os.Stat(appConfigFilePath); os.IsNotExist(err) {
|
||||
appConf, _ := config.ParseConfig()
|
||||
config.WriteConfigFile(appConfigFilePath, appConf)
|
||||
}
|
||||
|
||||
viper.SetConfigName("gaiad")
|
||||
viper.SetConfigName("app")
|
||||
err = viper.MergeInConfig()
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user