tendermint/cmd/gen_validator.go

26 lines
459 B
Go
Raw Normal View History

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"
)
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)
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"),
string(privValidatorJSONBytes),
)
}