Merge branch 'develop' of https://github.com/cosmos/cosmos-sdk into aditya/cleanup
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ func ExportCmd(ctx *Context, cdc *wire.Codec, appExporter AppExporter) *cobra.Co
|
||||
return err
|
||||
}
|
||||
|
||||
doc.AppStateJSON = appState
|
||||
doc.AppState = appState
|
||||
doc.Validators = validators
|
||||
|
||||
encoded, err := wire.MarshalJSONIndent(cdc, doc)
|
||||
|
||||
+3
-3
@@ -346,9 +346,9 @@ func readOrCreatePrivValidator(tmConfig *cfg.Config) crypto.PubKey {
|
||||
// error is returned if building or writing the configuration to file fails.
|
||||
func writeGenesisFile(cdc *wire.Codec, genesisFile, chainID string, validators []tmtypes.GenesisValidator, appState json.RawMessage) error {
|
||||
genDoc := tmtypes.GenesisDoc{
|
||||
ChainID: chainID,
|
||||
Validators: validators,
|
||||
AppStateJSON: appState,
|
||||
ChainID: chainID,
|
||||
Validators: validators,
|
||||
AppState: appState,
|
||||
}
|
||||
|
||||
if err := genDoc.ValidateAndComplete(); err != nil {
|
||||
|
||||
+11
-6
@@ -77,16 +77,21 @@ func interceptLoadConfig() (conf *cfg.Config, err error) {
|
||||
rootDir := tmpConf.RootDir
|
||||
configFilePath := filepath.Join(rootDir, "config/config.toml")
|
||||
// Intercept only if the file doesn't already exist
|
||||
|
||||
if _, err := os.Stat(configFilePath); os.IsNotExist(err) {
|
||||
// the following parse config is needed to create directories
|
||||
sdkDefaultConfig, _ := tcmd.ParseConfig()
|
||||
sdkDefaultConfig.ProfListenAddress = "prof_laddr=localhost:6060"
|
||||
sdkDefaultConfig.P2P.RecvRate = 5120000
|
||||
sdkDefaultConfig.P2P.SendRate = 5120000
|
||||
cfg.WriteConfigFile(configFilePath, sdkDefaultConfig)
|
||||
conf, _ = tcmd.ParseConfig()
|
||||
conf.ProfListenAddress = "localhost:6060"
|
||||
conf.P2P.RecvRate = 5120000
|
||||
conf.P2P.SendRate = 5120000
|
||||
conf.Consensus.TimeoutCommit = 5000
|
||||
cfg.WriteConfigFile(configFilePath, conf)
|
||||
// Fall through, just so that its parsed into memory.
|
||||
}
|
||||
conf, err = tcmd.ParseConfig()
|
||||
|
||||
if conf == nil {
|
||||
conf, err = tcmd.ParseConfig()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user