Merge pull request #711 from cosmos/cwgoes/move-basecoin-db

Move basecoin.db to ~/.basecoind/data
This commit is contained in:
Rigel 2018-03-27 22:28:19 +02:00 committed by GitHub
commit a9ce90a95d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

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
}

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
}