[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:
parent
ca21b6be93
commit
4896364952
|
@ -8,16 +8,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func gen_validator() {
|
func gen_validator() {
|
||||||
|
|
||||||
privValidator := types.GenPrivValidator()
|
privValidator := types.GenPrivValidator()
|
||||||
privValidatorJSONBytes := wire.JSONBytesPretty(privValidator)
|
privValidatorJSONBytes := wire.JSONBytesPretty(privValidator)
|
||||||
fmt.Printf(`Generated a new validator!
|
fmt.Printf(`%v
|
||||||
Paste the following JSON into your %v file
|
`, string(privValidatorJSONBytes))
|
||||||
|
|
||||||
%v
|
|
||||||
|
|
||||||
`,
|
|
||||||
config.GetString("priv_validator_file"),
|
|
||||||
string(privValidatorJSONBytes),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue