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-03-12 12:19:09 +0800
commitb0c906ba404b55147b5e3a085b6a4c3906524a1d (patch)
tree6c80b1af7c27cae9249f62232e8655141264660e /dex
parent4fe062fb2143463d19b3f1df378bb6205c10d3ec (diff)
downloaddexon-b0c906ba404b55147b5e3a085b6a4c3906524a1d.tar.gz
dexon-b0c906ba404b55147b5e3a085b6a4c3906524a1d.tar.zst
dexon-b0c906ba404b55147b5e3a085b6a4c3906524a1d.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)
}