mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-14 20:15:18 +00:00
e35747a5f5
* Make rocksdb configurable (#1658)
* Make rocksdb configurable
* Make sure rocksdb tests are running in CI
* Updating ci-rocksdb-build workflow
* Remove test.sh
* Update tm-db dependency
(cherry picked from commit 90fbe1aad7
)
* Rocksdb Metrics (#1692)
* Rocksdb Metrics
* Add rocksdb namespace for options
* Adding help to the metrics
* CR's fixes
* CR's fixes
* CR's fixes
* Increase number of options to configure rocksdb (#1696)
---------
Co-authored-by: Evgeniy Scherbina <evgeniy.shcherbina.es@gmail.com>
19 lines
545 B
Go
19 lines
545 B
Go
//go:build !rocksdb
|
|
// +build !rocksdb
|
|
|
|
package opendb
|
|
|
|
import (
|
|
"path/filepath"
|
|
|
|
"github.com/cosmos/cosmos-sdk/server/types"
|
|
dbm "github.com/tendermint/tm-db"
|
|
)
|
|
|
|
// 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)
|
|
}
|