github.com/evdatsion/aphelion-dpos-bft@v0.32.1/cmd/tendermint/main.go (about)

     1  package main
     2  
     3  import (
     4  	"os"
     5  	"path/filepath"
     6  
     7  	"github.com/evdatsion/aphelion-dpos-bft/libs/cli"
     8  
     9  	cmd "github.com/evdatsion/aphelion-dpos-bft/cmd/tendermint/commands"
    10  	cfg "github.com/evdatsion/aphelion-dpos-bft/config"
    11  	nm "github.com/evdatsion/aphelion-dpos-bft/node"
    12  )
    13  
    14  func main() {
    15  	rootCmd := cmd.RootCmd
    16  	rootCmd.AddCommand(
    17  		cmd.GenValidatorCmd,
    18  		cmd.InitFilesCmd,
    19  		cmd.ProbeUpnpCmd,
    20  		cmd.LiteCmd,
    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  
    31  	// NOTE:
    32  	// Users wishing to:
    33  	//	* Use an external signer for their validators
    34  	//	* Supply an in-proc abci app
    35  	//	* Supply a genesis doc file from another source
    36  	//	* Provide their own DB implementation
    37  	// can copy this file and use something other than the
    38  	// DefaultNewNode function
    39  	nodeFunc := nm.DefaultNewNode
    40  
    41  	// Create & start node
    42  	rootCmd.AddCommand(cmd.NewRunNodeCmd(nodeFunc))
    43  
    44  	cmd := cli.PrepareBaseCmd(rootCmd, "TM", os.ExpandEnv(filepath.Join("$HOME", cfg.DefaultTendermintDir)))
    45  	if err := cmd.Execute(); err != nil {
    46  		panic(err)
    47  	}
    48  }