gitlab.com/gpdionisio/tendermint@v0.34.19-dev2/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.ResetStateCmd, 26 cmd.ShowValidatorCmd, 27 cmd.TestnetFilesCmd, 28 cmd.ShowNodeIDCmd, 29 cmd.GenNodeKeyCmd, 30 cmd.VersionCmd, 31 cmd.RollbackStateCmd, 32 debug.DebugCmd, 33 cli.NewCompletionCmd(rootCmd, true), 34 ) 35 36 // NOTE: 37 // Users wishing to: 38 // * Use an external signer for their validators 39 // * Supply an in-proc abci app 40 // * Supply a genesis doc file from another source 41 // * Provide their own DB implementation 42 // can copy this file and use something other than the 43 // DefaultNewNode function 44 nodeFunc := nm.DefaultNewNode 45 46 // Create & start node 47 rootCmd.AddCommand(cmd.NewRunNodeCmd(nodeFunc)) 48 49 cmd := cli.PrepareBaseCmd(rootCmd, "TM", os.ExpandEnv(filepath.Join("$HOME", cfg.DefaultTendermintDir))) 50 if err := cmd.Execute(); err != nil { 51 panic(err) 52 } 53 }