From 4896364952f5a24ef64525d1da1af082b184d3e0 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Wed, 8 Feb 2017 23:20:25 +0400 Subject: [PATCH] [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 ``` --- cmd/tendermint/gen_validator.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/cmd/tendermint/gen_validator.go b/cmd/tendermint/gen_validator.go index 37f0e299..0fc0e166 100644 --- a/cmd/tendermint/gen_validator.go +++ b/cmd/tendermint/gen_validator.go @@ -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)) }