[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
No known key found for this signature in database
GPG Key ID: 7B6881D965918214
1 changed files with 2 additions and 10 deletions

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))
}