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

10 years ago
  1. package main
  2. import (
  3. "fmt"
  4. "github.com/tendermint/tendermint/binary"
  5. "github.com/tendermint/tendermint/config"
  6. sm "github.com/tendermint/tendermint/state"
  7. )
  8. func gen_validator() {
  9. privValidator := sm.GenPrivValidator()
  10. privValidatorJSONBytes := binary.JSONBytes(privValidator)
  11. fmt.Printf(`Generated a new validator!
  12. Paste the following JSON into your %v file
  13. %v
  14. `,
  15. config.App().GetString("PrivValidatorFile"),
  16. string(privValidatorJSONBytes),
  17. )
  18. }