Skip to content

Commit

Permalink
TMP Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-scherbina committed Jun 27, 2024
1 parent 26c04a8 commit 4753c9f
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ import (
ethmetricsexp "github.com/ethereum/go-ethereum/metrics/exp"

errorsmod "cosmossdk.io/errors"
"github.com/Kava-Labs/opendb"
_ "github.com/Kava-Labs/opendb"
rpcclient "github.com/cometbft/cometbft/rpc/client"
"github.com/cosmos/cosmos-sdk/client"
Expand Down Expand Up @@ -297,32 +296,6 @@ func startStandAlone(ctx *server.Context, opts StartOptions) error {
return server.WaitForQuitSignals()
}

// DefaultDBProvider returns a database using the DBBackend and DBDir
// specified in the ctx.Config.
func DefaultDBProvider(ctx *node.DBContext) (dbm.DB, error) {
// appOpts types.AppOptions, home string, backendType dbm.BackendType
_ = opendb.OpenDB

dbType := dbm.BackendType(ctx.Config.DBBackend)

fmt.Printf("############################## Stack ##############################\n")
fmt.Printf("ctx.ID : name : %v\n", ctx.ID)
fmt.Printf("dbType : backend: %v\n", dbType)
fmt.Printf("ctx.Config.DBDir(): dir : %v\n", ctx.Config.DBDir())

fmt.Printf("RootDir : %v\n", ctx.Config.RootDir)
fmt.Printf("DBPath : %v\n", ctx.Config.DBPath)
fmt.Printf("############################## Stack ##############################\n")

// name string, backend BackendType, dir string

// ctx.ID : name : blockstore
// dbType : backend: rocksdb
// ctx.Config.DBDir(): dir : /root/.kava/data

return dbm.NewDB(ctx.ID, dbType, ctx.Config.DBDir())
}

// legacyAminoCdc is used for the legacy REST API
func startInProcess(ctx *server.Context, clientCtx client.Context, opts StartOptions) (err error) {
cfg := ctx.Config
Expand Down Expand Up @@ -413,7 +386,7 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, opts StartOpt
nodeKey,
proxy.NewLocalClientCreator(app),
genDocProvider,
DefaultDBProvider,
node.DefaultDBProvider,
node.DefaultMetricsProvider(cfg.Instrumentation),
ctx.Logger.With("server", "node"),
)
Expand Down

0 comments on commit 4753c9f

Please sign in to comment.