Skip to content

Commit

Permalink
Merge pull request #74 from MinterTeam/dev
Browse files Browse the repository at this point in the history
exit after resetting validator
  • Loading branch information
danil-lashin authored Jul 31, 2018
2 parents 502932f + 1203fcc commit af89169
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/minter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func main() {

if *utils.ResetPrivateValidator {
resetFilePV(config.GetConfig().PrivValidatorFile())
os.Exit(0)
}

app := minter.NewMinterBlockchain()
Expand Down Expand Up @@ -78,10 +79,10 @@ func resetFilePV(privValFile string) {
if _, err := os.Stat(privValFile); err == nil {
pv := privval.LoadFilePV(privValFile)
pv.Reset()
log.Info("Reset private validator file to genesis state", "file", privValFile)
log.Error("Reset private validator file to genesis state", "file", privValFile)
} else {
pv := privval.GenFilePV(privValFile)
pv.Save()
log.Info("Generated private validator file", "file", privValFile)
log.Error("Generated private validator file", "file", privValFile)
}
}

0 comments on commit af89169

Please sign in to comment.