github.com/fiagdao/tendermint@v0.32.11-0.20220824195748-2087fcc480c1/cmd/tendermint/commands/reset_priv_validator.go (about) 1 package commands 2 3 import ( 4 "github.com/spf13/cobra" 5 ) 6 7 // ResetAllCmd removes the database of this Tendermint core 8 // instance. 9 var ResetAllCmd = &cobra.Command{ 10 Use: "unsafe_reset_all", 11 Short: "(unsafe) Remove all the data and WAL, reset this node's validator to genesis state", 12 Run: resetAll, 13 } 14 15 var keepAddrBook bool 16 17 func init() { 18 ResetAllCmd.Flags().BoolVar(&keepAddrBook, "keep-addr-book", false, "Keep the address book intact") 19 } 20 21 // ResetPrivValidatorCmd resets the private validator files. 22 var ResetPrivValidatorCmd = &cobra.Command{ 23 Use: "unsafe_reset_priv_validator", 24 Short: "(unsafe) Reset this node's validator to genesis state", 25 Run: resetPrivValidator, 26 } 27 28 // XXX: this is totally unsafe. 29 // it's only suitable for testnets. 30 func resetAll(cmd *cobra.Command, args []string) { 31 panic("deprecated") 32 } 33 34 // XXX: this is totally unsafe. 35 // it's only suitable for testnets. 36 func resetPrivValidator(cmd *cobra.Command, args []string) { 37 panic("deprecated") 38 }