From 98fd3d09e74f59ce65d3f3c91809956acf2457d7 Mon Sep 17 00:00:00 2001 From: Hussam Date: Fri, 17 May 2024 14:42:55 -0500 Subject: [PATCH] Path startup fix --- cmd/utils/cmd.go | 3 ++- cmd/utils/hierarchical_coordinator.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index e5a6fb1a9a..c2dcbf2951 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -4,6 +4,7 @@ import ( "fmt" "io" "os" + "path" "runtime" "slices" "strings" @@ -32,7 +33,7 @@ func OpenBackendDB() (*leveldb.DB, error) { return nil, err } } - dbPath := dataDir + "quaibackend" + dbPath := path.Join(dataDir, "quaibackend") db, err := leveldb.OpenFile(dbPath, nil) if err != nil { diff --git a/cmd/utils/hierarchical_coordinator.go b/cmd/utils/hierarchical_coordinator.go index d6440df30b..cbb39dcf41 100644 --- a/cmd/utils/hierarchical_coordinator.go +++ b/cmd/utils/hierarchical_coordinator.go @@ -52,7 +52,7 @@ type HierarchicalCoordinator struct { func NewHierarchicalCoordinator(p2p quai.NetworkingAPI, logLevel string, nodeWg *sync.WaitGroup, startingExpansionNumber uint64, quitCh chan struct{}) *HierarchicalCoordinator { db, err := OpenBackendDB() if err != nil { - log.Global.Fatal("Error opening the backend db") + log.Global.WithField("err", err).Fatal("Error opening the backend db") } hc := &HierarchicalCoordinator{ wg: nodeWg,