mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-20 22:26:15 +00:00
node: ConfigFromViper
This commit is contained in:
@@ -11,7 +11,7 @@ var replayCmd = &cobra.Command{
|
||||
Short: "Replay messages from WAL",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
config := getConfig()
|
||||
consensus.RunReplayFile(config.Config, config.Consensus, false)
|
||||
consensus.RunReplayFile(&config.Config, config.Consensus, false)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ var replayConsoleCmd = &cobra.Command{
|
||||
Short: "Replay messages from WAL in a console",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
config := getConfig()
|
||||
consensus.RunReplayFile(config.Config, config.Consensus, true)
|
||||
consensus.RunReplayFile(&config.Config, config.Consensus, true)
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -23,11 +23,7 @@ func init() {
|
||||
|
||||
// unmarshal viper into the Tendermint config
|
||||
func getConfig() *node.Config {
|
||||
config := new(node.Config)
|
||||
if err := viperConfig.Unmarshal(config); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return config
|
||||
return node.ConfigFromViper(viperConfig)
|
||||
}
|
||||
|
||||
//global flag
|
||||
|
||||
Reference in New Issue
Block a user