Skip to content

Commit

Permalink
exit after resetting validator
Browse files Browse the repository at this point in the history
  • Loading branch information
danil-lashin committed Jul 31, 2018
1 parent 7d5ac07 commit 1203fcc
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 1203fcc

Please sign in to comment.