cmd, common, node, rpc: move HTTP RPC into node, drop singletone aspect

This commit is contained in:
Péter Szilágyi
2016-02-05 13:45:36 +02:00
parent ba7c125153
commit a13bc9d7a1
10 changed files with 280 additions and 221 deletions

View File

@ -72,25 +72,3 @@ func HomeDir() string {
}
return ""
}
func DefaultDataDir() string {
// Try to place the data folder in the user's home dir
home := HomeDir()
if home != "" {
if runtime.GOOS == "darwin" {
return filepath.Join(home, "Library", "Ethereum")
} else if runtime.GOOS == "windows" {
return filepath.Join(home, "AppData", "Roaming", "Ethereum")
} else {
return filepath.Join(home, ".ethereum")
}
}
// As we cannot guess a stable location, return empty and handle later
return ""
}
// DefaultIpcSocket returns the relative name of the default IPC socket. The path
// resolution is done by a node with other contextual infos.
func DefaultIpcSocket() string {
return "geth.ipc"
}