Merge PR #3792: Use DBBackend set at compile time
* use DBBackend set at compile time Closes: #3719 * Refresh changelog * Tweak Makefile
This commit is contained in:
committed by
Christopher Goes
parent
c7f6a3e8c6
commit
3e82a8bbb8
@@ -6,6 +6,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
@@ -24,7 +25,7 @@ type (
|
||||
|
||||
func openDB(rootDir string) (dbm.DB, error) {
|
||||
dataDir := filepath.Join(rootDir, "data")
|
||||
db, err := dbm.NewGoLevelDB("application", dataDir)
|
||||
db, err := sdk.NewLevelDB("application", dataDir)
|
||||
return db, err
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -8,7 +8,6 @@ import (
|
||||
"github.com/tendermint/tendermint/types"
|
||||
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
bam "github.com/cosmos/cosmos-sdk/baseapp"
|
||||
@@ -20,7 +19,7 @@ import (
|
||||
// similar to a real app. Make sure rootDir is empty before running the test,
|
||||
// in order to guarantee consistent results
|
||||
func NewApp(rootDir string, logger log.Logger) (abci.Application, error) {
|
||||
db, err := dbm.NewGoLevelDB("mock", filepath.Join(rootDir, "data"))
|
||||
db, err := sdk.NewLevelDB("mock", filepath.Join(rootDir, "data"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user