[cli] cleanup gen_validator output (Fixes #396)

so we can pipe result to a file:

```
tendermint gen_validator > example.json
```

before this we had to cut first 3 lines:

```
tendermint gen_validator | sed 1,3d > example.json
```
This commit is contained in:
Anton Kaliaev
2017-02-08 23:20:25 +04:00
parent ca21b6be93
commit 4896364952

View File

@@ -8,16 +8,8 @@ import (
)
func gen_validator() {
privValidator := types.GenPrivValidator()
privValidatorJSONBytes := wire.JSONBytesPretty(privValidator)
fmt.Printf(`Generated a new validator!
Paste the following JSON into your %v file
%v
`,
config.GetString("priv_validator_file"),
string(privValidatorJSONBytes),
)
fmt.Printf(`%v
`, string(privValidatorJSONBytes))
}