github.com/noirx94/tendermintmp@v0.0.1/cmd/tendermint/main.go (about) 1 package main 2 3 import ( 4 "os" 5 "path/filepath" 6 7 cmd "github.com/tendermint/tendermint/cmd/tendermint/commands" 8 "github.com/tendermint/tendermint/cmd/tendermint/commands/debug" 9 cfg "github.com/tendermint/tendermint/config" 10 "github.com/tendermint/tendermint/libs/cli" 11 nm "github.com/tendermint/tendermint/node" 12 ) 13 14 func main() { 15 rootCmd := cmd.RootCmd 16 rootCmd.AddCommand( 17 cmd.GenValidatorCmd, 18 cmd.InitFilesCmd, 19 cmd.ProbeUpnpCmd, 20 cmd.LightCmd, 21 cmd.ReplayCmd, 22 cmd.ReplayConsoleCmd, 23 cmd.ResetAllCmd, 24 cmd.ResetPrivValidatorCmd, 25 cmd.ShowValidatorCmd, 26 cmd.TestnetFilesCmd, 27 cmd.ShowNodeIDCmd, 28 cmd.GenNodeKeyCmd, 29 cmd.VersionCmd, 30 cmd.RollbackStateCmd, 31 debug.DebugCmd, 32 cli.NewCompletionCmd(rootCmd, true), 33 ) 34 35 // NOTE: 36 // Users wishing to: 37 // * Use an external signer for their validators 38 // * Supply an in-proc abci app 39 // * Supply a genesis doc file from another source 40 // * Provide their own DB implementation 41 // can copy this file and use something other than the 42 // DefaultNewNode function 43 nodeFunc := nm.DefaultNewNode 44 45 // Create & start node 46 rootCmd.AddCommand(cmd.NewRunNodeCmd(nodeFunc)) 47 48 cmd := cli.PrepareBaseCmd(rootCmd, "TM", os.ExpandEnv(filepath.Join("$HOME", cfg.DefaultTendermintDir))) 49 if err := cmd.Execute(); err != nil { 50 panic(err) 51 } 52 }