Skip to content

Commit

Permalink
correct rocksdb path -- ensure we use KAVA_HOME/data/application.db (#…
Browse files Browse the repository at this point in the history
…1767)

and not a nested application.db within that path
  • Loading branch information
nddeluca committed Nov 7, 2023
1 parent 802f1c8 commit 72063dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/kava/opendb/opendb_rocksdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const (
func OpenDB(appOpts types.AppOptions, home string, backendType dbm.BackendType) (dbm.DB, error) {
dataDir := filepath.Join(home, "data")
if backendType == dbm.RocksDBBackend {
return openRocksdb(filepath.Join(dataDir, "application.db"), appOpts)
return openRocksdb(dataDir, appOpts)
}

return dbm.NewDB("application", backendType, dataDir)
Expand All @@ -90,7 +90,8 @@ func OpenDB(appOpts types.AppOptions, home string, backendType dbm.BackendType)
// openRocksdb loads existing options, overrides some of them with appOpts and opens database
// option will be overridden only in case if it explicitly specified in appOpts
func openRocksdb(dir string, appOpts types.AppOptions) (dbm.DB, error) {
dbOpts, cfOpts, err := loadLatestOptions(dir)
optionsPath := filepath.Join(dir, "application.db")
dbOpts, cfOpts, err := loadLatestOptions(optionsPath)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 72063dd

Please sign in to comment.