feat: replace the cosmos-db.DB interface with core/store interface (#21450)

This commit is contained in:
cool-developer
2024-08-30 21:25:25 +00:00
committed by GitHub
parent f843f1a478
commit ce4fb98cb8
119 changed files with 553 additions and 550 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
corestore "cosmossdk.io/core/store"
"cosmossdk.io/log"
pruningtypes "cosmossdk.io/store/pruning/types"
"cosmossdk.io/store/rootmulti"
@@ -107,7 +108,7 @@ Supported app-db-backend types include 'goleveldb', 'rocksdb', 'pebbledb'.`,
return cmd
}
func openDB(rootDir string, backendType dbm.BackendType) (dbm.DB, error) {
func openDB(rootDir string, backendType dbm.BackendType) (corestore.KVStoreWithBatch, error) {
dataDir := filepath.Join(rootDir, "data")
return dbm.NewDB("application", backendType, dataDir)
}