good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit fbcf48f2 authored by Igor Mandrigin's avatar Igor Mandrigin Committed by GitHub
Browse files

Store ethash datafiles in a separate directory. (#949)

parent 01f211f3
No related branches found
No related tags found
No related merge requests found
......@@ -86,16 +86,19 @@ func init() {
}
}
if runtime.GOOS == "darwin" {
DefaultConfig.Ethash.DatasetDir = filepath.Join(home, "Library", "Ethash")
DefaultConfig.Ethash.DatasetDir = filepath.Join(home, "Library", "tg-ethash")
} else if runtime.GOOS == "windows" {
localappdata := os.Getenv("LOCALAPPDATA")
if localappdata != "" {
DefaultConfig.Ethash.DatasetDir = filepath.Join(localappdata, "Ethash")
DefaultConfig.Ethash.DatasetDir = filepath.Join(localappdata, "tg-thash")
} else {
DefaultConfig.Ethash.DatasetDir = filepath.Join(home, "AppData", "Local", "Ethash")
DefaultConfig.Ethash.DatasetDir = filepath.Join(home, "AppData", "Local", "tg-ethash")
}
} else {
DefaultConfig.Ethash.DatasetDir = filepath.Join(home, ".ethash")
if xdgDataDir := os.Getenv("XDG_DATA_HOME"); xdgDataDir != "" {
DefaultConfig.Ethash.DatasetDir = filepath.Join(xdgDataDir, "tg-ethash")
}
DefaultConfig.Ethash.DatasetDir = filepath.Join(home, ".local/share/tg-ethash")
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment