aboutsummaryrefslogtreecommitdiffstats
path: root/dex
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-15 12:16:18 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 13:49:53 +0800
commitcada6546668db5b0f02d55bfb4a9d232b8185cf5 (patch)
tree7bf6710638a7dccc176e463607edbf5d7ce62b90 /dex
parent73691a5ac6b0da2e53473987620557e45ebfaf24 (diff)
downloaddexon-cada6546668db5b0f02d55bfb4a9d232b8185cf5.tar
dexon-cada6546668db5b0f02d55bfb4a9d232b8185cf5.tar.gz
dexon-cada6546668db5b0f02d55bfb4a9d232b8185cf5.tar.bz2
dexon-cada6546668db5b0f02d55bfb4a9d232b8185cf5.tar.lz
dexon-cada6546668db5b0f02d55bfb4a9d232b8185cf5.tar.xz
dexon-cada6546668db5b0f02d55bfb4a9d232b8185cf5.tar.zst
dexon-cada6546668db5b0f02d55bfb4a9d232b8185cf5.zip
dex: move dexcon blockdb into datadir
Diffstat (limited to 'dex')
-rw-r--r--dex/backend.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/dex/backend.go b/dex/backend.go
index 3d59d9f2c..0e475dec0 100644
--- a/dex/backend.go
+++ b/dex/backend.go
@@ -19,6 +19,7 @@ package dex
import (
"fmt"
+ "path/filepath"
"time"
dexCore "github.com/dexon-foundation/dexon-consensus-core/core"
@@ -82,7 +83,8 @@ type Dexon struct {
func New(ctx *node.ServiceContext, config *Config) (*Dexon, error) {
// Consensus.
- db, err := blockdb.NewLevelDBBackedBlockDB("main.blockdb")
+ blockDBPath := filepath.Join(ctx.Config.DataDir, "dexcon", "blockdb")
+ db, err := blockdb.NewLevelDBBackedBlockDB(blockDBPath)
if err != nil {
panic(err)
}