From 84c947edeb50ff60b651d617ab8830561da5bb63 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Fri, 5 Jan 2018 13:43:47 -0800 Subject: [PATCH] lnd: move channeldb to graph dir --- lnd.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lnd.go b/lnd.go index d27b23fc..73ff86c4 100644 --- a/lnd.go +++ b/lnd.go @@ -19,6 +19,7 @@ import ( "net/http" _ "net/http/pprof" "os" + "path/filepath" "runtime" "runtime/pprof" "sync" @@ -133,9 +134,14 @@ func lndMain() error { defer pprof.StopCPUProfile() } + // Create the network-segmented directory for the channel database. + graphDir := filepath.Join(cfg.DataDir, + defaultGraphSubDirname, + normalizeNetwork(activeNetParams.Name)) + // Open the channeldb, which is dedicated to storing channel, and // network related metadata. - chanDB, err := channeldb.Open(cfg.DataDir) + chanDB, err := channeldb.Open(graphDir) if err != nil { ltndLog.Errorf("unable to open channeldb: %v", err) return err