diff --git a/app/client/cli/debug.go b/app/client/cli/debug.go index 184c07947..751dfd75e 100644 --- a/app/client/cli/debug.go +++ b/app/client/cli/debug.go @@ -23,6 +23,7 @@ const ( PromptSendBlockRequest string = "BlockRequest (broadcast)" ) +<<<<<<< HEAD var items = []string{ PromptPrintNodeState, PromptTriggerNextView, @@ -39,6 +40,30 @@ func init() { rootCmd.AddCommand(dbgUI) } +======= +var ( + items = []string{ + PromptPrintNodeState, + PromptTriggerNextView, + PromptTogglePacemakerMode, + PromptResetToGenesis, + PromptShowLatestBlockInStore, + PromptSendMetadataRequest, + PromptSendBlockRequest, + } +) + +func init() { + dbgUI := newDebugUICommand() + dbgUI.AddCommand(newDebugUISubCommands()...) + rootCmd.AddCommand(dbgUI) + + dbg := newDebugCommand() + dbg.AddCommand(debugCommands()...) + rootCmd.AddCommand(dbg) +} + +>>>>>>> main // newDebugUISubCommands builds out the list of debug subcommands by matching the // handleSelect dispatch to the appropriate command. // * To add a debug subcommand, you must add it to the `items` array and then diff --git a/app/client/cli/helpers/setup.go b/app/client/cli/helpers/setup.go index c466e2ebe..3766b6ae9 100644 --- a/app/client/cli/helpers/setup.go +++ b/app/client/cli/helpers/setup.go @@ -24,7 +24,7 @@ const debugPrivKey = "09fc8ee114e678e665d09179acb9a30060f680df44ba06b51434ee4794 // P2PDependenciesPreRunE initializes peerstore & current height providers, and a // p2p module which consumes them. Everything is registered to the bus. func P2PDependenciesPreRunE(cmd *cobra.Command, _ []string) error { - // TECHDEBT: this is to keep backwards compatibility with localnet + // TECHDEBT: this was being used for backwards compatibility with LocalNet and need to re-evaluate if its still necessary flags.ConfigPath = runtime.GetEnv("CONFIG_PATH", "build/config/config.validator1.json") configs.ParseConfig(flags.ConfigPath) @@ -38,6 +38,13 @@ func P2PDependenciesPreRunE(cmd *cobra.Command, _ []string) error { // set final `remote_cli_url` value; order of precedence: flag > env var > config > default flags.RemoteCLIURL = viper.GetString("remote_cli_url") + // By this time, the config path should be set. + // This is only being called for viper related side effects + // TECHDEBT(#907): refactor and improve how viper is used to parse configs throughout the codebase + _ = configs.ParseConfig(flags.ConfigPath) + // set final `remote_cli_url` value; order of precedence: flag > env var > config > default + flags.RemoteCLIURL = viper.GetString("remote_cli_url") + runtimeMgr := runtime.NewManagerFromFiles( flags.ConfigPath, genesisPath, runtime.WithClientDebugMode(),