Browse Source

Merge pull request #454 from tendermint/reset_fix

reset fix
pull/461/head
Ethan Buchman 8 years ago
committed by GitHub
parent
commit
207798b09a
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      cmd/tendermint/commands/reset_priv_validator.go

+ 3
- 3
cmd/tendermint/commands/reset_priv_validator.go View File

@ -48,15 +48,15 @@ func ResetAll(c cfg.Config, l log15.Logger) {
func ResetPrivValidator(c cfg.Config, l log15.Logger) {
// Get PrivValidator
var privValidator *types.PrivValidator
privValidatorFile := config.GetString("priv_validator_file")
privValidatorFile := c.GetString("priv_validator_file")
if _, err := os.Stat(privValidatorFile); err == nil {
privValidator = types.LoadPrivValidator(privValidatorFile)
privValidator.Reset()
log.Notice("Reset PrivValidator", "file", privValidatorFile)
l.Notice("Reset PrivValidator", "file", privValidatorFile)
} else {
privValidator = types.GenPrivValidator()
privValidator.SetFile(privValidatorFile)
privValidator.Save()
log.Notice("Generated PrivValidator", "file", privValidatorFile)
l.Notice("Generated PrivValidator", "file", privValidatorFile)
}
}

Loading…
Cancel
Save