github.com/number571/tendermint@v0.34.11-gost/cmd/tendermint/main.go (about) 1 package main 2 3 import ( 4 "os" 5 "path/filepath" 6 7 cmd "github.com/number571/tendermint/cmd/tendermint/commands" 8 "github.com/number571/tendermint/cmd/tendermint/commands/debug" 9 cfg "github.com/number571/tendermint/config" 10 "github.com/number571/tendermint/libs/cli" 11 nm "github.com/number571/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 debug.DebugCmd, 31 cli.NewCompletionCmd(rootCmd, true), 32 ) 33 34 // NOTE: 35 // Users wishing to: 36 // * Use an external signer for their validators 37 // * Supply an in-proc abci app 38 // * Supply a genesis doc file from another source 39 // * Provide their own DB implementation 40 // can copy this file and use something other than the 41 // node.NewDefault function 42 nodeFunc := nm.NewDefault 43 44 // Create & start node 45 rootCmd.AddCommand(cmd.NewRunNodeCmd(nodeFunc)) 46 47 cmd := cli.PrepareBaseCmd(rootCmd, "TM", os.ExpandEnv(filepath.Join("$HOME", cfg.DefaultTendermintDir))) 48 if err := cmd.Execute(); err != nil { 49 panic(err) 50 } 51 }