OSDN Git Service

fix review
authormars <mars@bytom.io>
Sat, 20 Jul 2019 08:50:47 +0000 (16:50 +0800)
committermars <mars@bytom.io>
Sat, 20 Jul 2019 08:50:47 +0000 (16:50 +0800)
cmd/reward/command/init.go
toolbar/reward/config/config.go

index 1ffe729..f7e3f8a 100644 (file)
@@ -29,7 +29,6 @@ func initFiles(cmd *cobra.Command, args []string) {
        configFilePath := cfg.ConfigFile()
        if _, err := os.Stat(configFilePath); !os.IsNotExist(err) {
                log.WithFields(log.Fields{"module": logModule, "config": configFilePath}).Fatal("Already exists config file.")
-               return
        }
 
        if err := cfg.ExportFederationFile(configFilePath, config); err != nil {
index 8cdb73d..835f4eb 100644 (file)
@@ -22,12 +22,10 @@ func DefaultConfig(isVoterReward bool) *Config {
                return &Config{
                        VoteConf: DefaultVoteRewardConfig(),
                }
-       } else {
-               return &Config{
-                       OptionalNodeConf: DefaultOptionalNodeRewardConfig(),
-               }
        }
-
+       return &Config{
+               OptionalNodeConf: DefaultOptionalNodeRewardConfig(),
+       }
 }
 
 func ConfigFile() string {