2014-12-09 18:49:04 -08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/tendermint/tendermint/config"
|
2014-12-17 01:37:13 -08:00
|
|
|
"github.com/tendermint/tendermint/state"
|
2015-01-13 21:03:01 -08:00
|
|
|
|
|
|
|
. "github.com/tendermint/tendermint/binary"
|
2014-12-09 18:49:04 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
func gen_validator() {
|
|
|
|
|
2014-12-17 01:37:13 -08:00
|
|
|
privValidator := state.GenPrivValidator()
|
2015-01-13 21:03:01 -08:00
|
|
|
privValidatorJSONBytes := JSONBytes(privValidator)
|
2014-12-28 00:44:56 -08:00
|
|
|
fmt.Printf(`Generated a new validator!
|
|
|
|
Paste the following JSON into your %v file
|
|
|
|
|
|
|
|
%v
|
|
|
|
|
|
|
|
`,
|
2015-01-08 16:40:23 -08:00
|
|
|
config.App.GetString("PrivValidatorFile"),
|
2014-12-28 00:44:56 -08:00
|
|
|
string(privValidatorJSONBytes),
|
|
|
|
)
|
2014-12-09 18:49:04 -08:00
|
|
|
}
|