Skip to content

Commit

Permalink
fix: revert base path (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevMac authored Nov 1, 2024
1 parent dbddfd4 commit 650338c
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions configs/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ package configs

import (
"fmt"
"os"
"path/filepath"

"github.com/NethermindEth/sedge/internal/locker"
"github.com/NethermindEth/sedge/internal/monitoring/data"
"github.com/spf13/afero"
)

// All the strings that are needed for debugging and info logging, and constant strings.
Expand Down Expand Up @@ -123,17 +120,10 @@ Happy Staking!
var DefaultAbsSedgeDataPath string

func init() {
// Set filesystem
// fs := afero.NewMemMapFs() // Uncomment this line if you want to use the in-memory filesystem
// fs := afero.NewBasePathFs(afero.NewOsFs(), "/tmp") // Uncomment this line if you want to use the real filesystem with a base path
fs := afero.NewOsFs() // Uncomment this line if you want to use the real filesystem

// Set locker
locker := locker.NewFLock()
dataDir, err := data.NewDataDirDefault(fs, locker)
cwd, err := os.Getwd()
if err != nil {
// notest
fmt.Println(err)
}

DefaultAbsSedgeDataPath = filepath.Join(dataDir.Path(), DefaultSedgeDataFolderName)
DefaultAbsSedgeDataPath = filepath.Join(cwd, DefaultSedgeDataFolderName)
}

0 comments on commit 650338c

Please sign in to comment.