mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Validator client - Improve readability - NO FUNCTIONAL CHANGE (#13468)
* Improve `NewServiceRegistry` documentation. * Improve `README.md`. * Improve readability of `registerValidatorService`. * Move `log` in `main.go`. Since `log` is only used in `main.go`. * Clean Tos. * `DefaultDataDir`: Use `switch` instead of `if/elif`. * `ReadPassword`: Remove unused receiver. * `validator/main.go`: Clean. * `WarnIfPlatformNotSupported`: Add Mac OSX ARM64. * `runner.go`: Use idiomatic `err` handling. * `waitForChainStart`: Avoid `chainStartResponse`mutation. * `WaitForChainStart`: Reduce cognitive complexity. * Logs: `powchain` ==> `execution`.
This commit is contained in:
@@ -31,11 +31,12 @@ func DefaultDataDir() string {
|
||||
// Try to place the data folder in the user's home dir
|
||||
home := file.HomeDir()
|
||||
if home != "" {
|
||||
if runtime.GOOS == "darwin" {
|
||||
switch runtime.GOOS {
|
||||
case "darwin":
|
||||
return filepath.Join(home, "Library", "Eth2")
|
||||
} else if runtime.GOOS == "windows" {
|
||||
case "windows":
|
||||
return filepath.Join(home, "AppData", "Local", "Eth2")
|
||||
} else {
|
||||
default:
|
||||
return filepath.Join(home, ".eth2")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user