mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 14:21:14 +00:00
[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:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user