Browse Source

[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
```
pull/399/head
Anton Kaliaev 8 years ago
parent
commit
4896364952
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 2 additions and 10 deletions
  1. +2
    -10
      cmd/tendermint/gen_validator.go

+ 2
- 10
cmd/tendermint/gen_validator.go 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))
}

Loading…
Cancel
Save