Move basecoin.db to ~/.basecoind/data in app and mock (ref #683)

This commit is contained in:
Christopher Goes
2018-03-27 12:14:35 +02:00
parent fb1a9495c3
commit 4a8e762adf
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"github.com/spf13/cobra"
@@ -50,7 +51,7 @@ func defaultOptions(args []string) (json.RawMessage, error) {
}
func generateApp(rootDir string, logger log.Logger) (abci.Application, error) {
db, err := dbm.NewGoLevelDB("basecoin", rootDir)
db, err := dbm.NewGoLevelDB("basecoin", filepath.Join(rootDir, "data"))
if err != nil {
return nil, err
}
+2 -1
View File
@@ -3,6 +3,7 @@ package mock
import (
"encoding/json"
"fmt"
"path/filepath"
abci "github.com/tendermint/abci/types"
dbm "github.com/tendermint/tmlibs/db"
@@ -17,7 +18,7 @@ import (
// 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", rootDir)
db, err := dbm.NewGoLevelDB("mock", filepath.Join(rootDir, "data"))
if err != nil {
return nil, err
}