2015-04-08 14:31:20 -07:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
2017-05-04 21:37:12 +02:00
|
|
|
"github.com/tendermint/tmlibs/cli"
|
2017-09-13 00:18:07 +02:00
|
|
|
|
2017-09-18 17:40:24 -04:00
|
|
|
cmd "github.com/tendermint/tendermint/cmd/tendermint/commands"
|
2017-09-21 17:08:17 -04:00
|
|
|
nm "github.com/tendermint/tendermint/node"
|
2015-04-08 14:31:20 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2017-09-18 17:40:24 -04:00
|
|
|
rootCmd := cmd.RootCmd
|
|
|
|
rootCmd.AddCommand(
|
|
|
|
cmd.GenValidatorCmd,
|
|
|
|
cmd.InitFilesCmd,
|
|
|
|
cmd.ProbeUpnpCmd,
|
2017-12-11 16:37:48 -05:00
|
|
|
cmd.LiteCmd,
|
2017-09-18 17:40:24 -04:00
|
|
|
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
|
2017-09-18 17:40:24 -04:00
|
|
|
// can copy this file and use something other than the
|
2017-09-21 17:08:17 -04:00
|
|
|
// DefaultNewNode function
|
|
|
|
nodeFunc := nm.DefaultNewNode
|
2017-09-13 00:18:07 +02:00
|
|
|
|
|
|
|
// Create & start node
|
2017-09-21 17:08:17 -04:00
|
|
|
rootCmd.AddCommand(cmd.NewRunNodeCmd(nodeFunc))
|
2017-09-13 00:18:07 +02:00
|
|
|
|
|
|
|
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)
|
|
|
|
}
|
2015-04-08 14:31:20 -07:00
|
|
|
}
|