1
0
mirror of https://github.com/fluencelabs/tendermint synced 2025-07-03 14:41:37 +00:00
Files
tendermint/cmd/tendermint/main.go

45 lines
1003 B
Go
Raw Normal View History

package main
import (
"os"
"github.com/tendermint/tmlibs/cli"
cmd "github.com/tendermint/tendermint/cmd/tendermint/commands"
2017-09-21 17:08:17 -04:00
nm "github.com/tendermint/tendermint/node"
)
func main() {
rootCmd := cmd.RootCmd
rootCmd.AddCommand(
cmd.GenValidatorCmd,
cmd.InitFilesCmd,
cmd.ProbeUpnpCmd,
cmd.LiteCmd,
cmd.ReplayCmd,
cmd.ReplayConsoleCmd,
cmd.ResetAllCmd,
cmd.ResetPrivValidatorCmd,
cmd.ShowValidatorCmd,
cmd.TestnetFilesCmd,
cmd.VersionCmd)
// NOTE:
// Users wishing to:
// * Use an external signer for their validators
// * Supply an in-proc abci app
2017-09-21 17:08:17 -04:00
// * Supply a genesis doc file from another source
2017-09-21 21:44:36 -04:00
// * Provide their own DB implementation
// can copy this file and use something other than the
2017-09-21 17:08:17 -04:00
// DefaultNewNode function
nodeFunc := nm.DefaultNewNode
// Create & start node
2017-09-21 17:08:17 -04:00
rootCmd.AddCommand(cmd.NewRunNodeCmd(nodeFunc))
cmd := cli.PrepareBaseCmd(rootCmd, "TM", os.ExpandEnv("$HOME/.tendermint"))
2017-09-06 11:50:43 -04:00
if err := cmd.Execute(); err != nil {
panic(err)
}
}