lnd: move channeldb to graph dir
This commit is contained in:
parent
d0afac0407
commit
84c947edeb
8
lnd.go
8
lnd.go
@ -19,6 +19,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
_ "net/http/pprof"
|
_ "net/http/pprof"
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
"sync"
|
"sync"
|
||||||
@ -133,9 +134,14 @@ func lndMain() error {
|
|||||||
defer pprof.StopCPUProfile()
|
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
|
// Open the channeldb, which is dedicated to storing channel, and
|
||||||
// network related metadata.
|
// network related metadata.
|
||||||
chanDB, err := channeldb.Open(cfg.DataDir)
|
chanDB, err := channeldb.Open(graphDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ltndLog.Errorf("unable to open channeldb: %v", err)
|
ltndLog.Errorf("unable to open channeldb: %v", err)
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user