Require moniker instead of generating a random one

This commit is contained in:
Aleksandr Bezobchuk 2018-11-12 08:27:26 -05:00
parent 29bec833f3
commit 08a1667246
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ IMPROVEMENTS
* [\#2749](https://github.com/cosmos/cosmos-sdk/pull/2749) Add --chain-id flag to gaiad testnet
* Gaia
* Generate a random moniker on `gaiad init` if one was not provided.
* Require moniker to be provided on `gaiad init`.
* SDK
- [x/mock/simulation] [\#2720] major cleanup, introduction of helper objects, reorganization

View File

@ -64,7 +64,7 @@ func InitCmd(ctx *server.Context, cdc *codec.Codec, appInit server.AppInit) *cob
moniker := viper.GetString(flagMoniker)
if moniker == "" {
moniker = fmt.Sprintf("gaianode-%v", common.RandStr(6))
return fmt.Errorf("required flag \"%s\" has not been set", flagMoniker)
}
config.Moniker = moniker