You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
465 B

package main
import (
"fmt"
"github.com/tendermint/tendermint/binary"
"github.com/tendermint/tendermint/config"
sm "github.com/tendermint/tendermint/state"
)
func gen_validator() {
privValidator := sm.GenPrivValidator()
privValidatorJSONBytes := binary.JSONBytes(privValidator)
fmt.Printf(`Generated a new validator!
Paste the following JSON into your %v file
%v
`,
config.App().GetString("PrivValidatorFile"),
string(privValidatorJSONBytes),
)
}