mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-27 16:55:21 +00:00
26 lines
393 B
Go
26 lines
393 B
Go
package chaincfg
|
|
|
|
import (
|
|
stdlog "log"
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
const (
|
|
HomeDirName = ".0gchain"
|
|
)
|
|
|
|
var (
|
|
// DefaultNodeHome default home directories for the application daemon
|
|
DefaultNodeHome string
|
|
)
|
|
|
|
func init() {
|
|
userHomeDir, err := os.UserHomeDir()
|
|
if err != nil {
|
|
stdlog.Printf("Failed to get home dir %v", err)
|
|
}
|
|
|
|
DefaultNodeHome = filepath.Join(userHomeDir, HomeDirName)
|
|
}
|