From 72063ddda9a8412b0e83adc656958ad28564b25c Mon Sep 17 00:00:00 2001 From: Nick DeLuca Date: Mon, 6 Nov 2023 18:06:50 -0700 Subject: [PATCH] correct rocksdb path -- ensure we use KAVA_HOME/data/application.db (#1767) and not a nested application.db within that path --- cmd/kava/opendb/opendb_rocksdb.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/kava/opendb/opendb_rocksdb.go b/cmd/kava/opendb/opendb_rocksdb.go index 6bd3563602..c445933ea3 100644 --- a/cmd/kava/opendb/opendb_rocksdb.go +++ b/cmd/kava/opendb/opendb_rocksdb.go @@ -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) @@ -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 }