mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-31 16:21:21 +00:00
Store ethash datafiles in a separate directory. (#949)
This commit is contained in:
parent
01f211f3b8
commit
fbcf48f29d
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user