Move keybase DB to ~/.basecoind/data (closes #644)

This commit is contained in:
Christopher Goes
2018-03-29 12:04:52 +02:00
parent 27d24610ab
commit bb66b852ef
4 changed files with 11 additions and 5 deletions
+6 -1
View File
@@ -3,8 +3,12 @@ package main
import (
"fmt"
"os"
"path/filepath"
"github.com/spf13/viper"
"github.com/tendermint/abci/server"
"github.com/tendermint/tmlibs/cli"
cmn "github.com/tendermint/tmlibs/common"
dbm "github.com/tendermint/tmlibs/db"
"github.com/tendermint/tmlibs/log"
@@ -17,7 +21,8 @@ func main() {
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)).With("module", "main")
db, err := dbm.NewGoLevelDB("basecoind", "data")
rootDir := viper.GetString(cli.HomeFlag)
db, err := dbm.NewGoLevelDB("basecoind", filepath.Join(rootDir, "data"))
if err != nil {
fmt.Println(err)
os.Exit(1)