Skip to content

Commit

Permalink
in line comments
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic committed Apr 23, 2024
1 parent 05bca21 commit 2b6a020
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/osmosisd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@ func overwriteConfigTomlValues(serverCtx *server.Context) error {
for _, rec := range recommendedConfigTomlValues {
currentValue := serverCtx.Viper.Get(rec.Section + "." + rec.Key)
if currentValue != rec.Value {
// Current value in config.toml is not the recommended value
// Set the value in viper to the recommended value
// and add it to the list of key values we will overwrite in the config.toml
serverCtx.Viper.Set(rec.Section+"."+rec.Key, rec.Value)
sectionKeyValuesToWrite = append(sectionKeyValuesToWrite, rec)
}
Expand Down Expand Up @@ -531,6 +534,9 @@ func overwriteAppTomlValues(serverCtx *server.Context) error {
for _, rec := range recommendedAppTomlValues {
currentValue := serverCtx.Viper.Get(rec.Section + "." + rec.Key)
if currentValue != rec.Value {
// Current value in app.toml is not the recommended value
// Set the value in viper to the recommended value
// and add it to the list of key values we will overwrite in the app.toml
serverCtx.Viper.Set(rec.Section+"."+rec.Key, rec.Value)
sectionKeyValuesToWrite = append(sectionKeyValuesToWrite, rec)
}
Expand Down

0 comments on commit 2b6a020

Please sign in to comment.