0g-chain/cmd/opendb/opendb.go
Solovyov1796 2ce418a5eb
Some checks failed
Continuous Integration (Commit) / lint (push) Has been cancelled
migrate from v0.25
2024-08-02 19:32:08 +08:00

19 lines
549 B
Go

//go:build !rocksdb
// +build !rocksdb
package opendb
import (
"path/filepath"
dbm "github.com/cometbft/cometbft-db"
"github.com/cosmos/cosmos-sdk/server/types"
)
// OpenDB is a copy of default DBOpener function used by ethermint, see for details:
// https://github.com/evmos/ethermint/blob/07cf2bd2b1ce9bdb2e44ec42a39e7239292a14af/server/start.go#L647
func OpenDB(_ types.AppOptions, home string, backendType dbm.BackendType) (dbm.DB, error) {
dataDir := filepath.Join(home, "data")
return dbm.NewDB("application", backendType, dataDir)
}