Browse Source

undo change

pull/8081/head
marbar3778 3 years ago
parent
commit
c1d4cca9d7
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      cmd/tendermint/commands/reset_priv_validator.go

+ 5
- 2
cmd/tendermint/commands/reset_priv_validator.go View File

@ -74,9 +74,12 @@ func MakeResetPrivateValidatorCommand(conf *config.Config, logger log.Logger) *c
// resetAll removes address book files plus all data, and resets the privValdiator data.
// Exported so other CLI tools can use it.
func resetAll(dbDir string, privValKeyFile, privValStateFile string, logger log.Logger, keyType string) error {
if err := resetState(dbDir, logger, keyType); err != nil {
return err
if err := os.RemoveAll(dbDir); err == nil {
logger.Info("Removed all blockchain history", "dir", dbDir)
} else {
logger.Error("error removing all blockchain history", "dir", dbDir, "err", err)
}
return resetFilePV(privValKeyFile, privValStateFile, logger, keyType)
}


Loading…
Cancel
Save