github.com/devwanda/aphelion-staking@v0.33.9/cmd/tendermint/main.go (about)

     1  package main
     2  
     3  import (
     4  	"os"
     5  	"path/filepath"
     6  
     7  	cmd "github.com/devwanda/aphelion-staking/cmd/tendermint/commands"
     8  	"github.com/devwanda/aphelion-staking/cmd/tendermint/commands/debug"
     9  	cfg "github.com/devwanda/aphelion-staking/config"
    10  	"github.com/devwanda/aphelion-staking/libs/cli"
    11  	nm "github.com/devwanda/aphelion-staking/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  		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  	// DefaultNewNode function
    42  	nodeFunc := nm.DefaultNewNode
    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  }