Reimplement -datadir flag. Implements #79

The config file is actually loaded from the folder that datadir points at
This commit is contained in:
Maran
2014-06-11 12:33:11 +02:00
parent 57e3b1b093
commit e36badd744
4 changed files with 12 additions and 4 deletions

View File

@ -43,14 +43,14 @@ func main() {
ethchain.InitFees()
g, err := globalconf.NewWithOptions(&globalconf.Options{
Filename: path.Join(ethutil.ApplicationFolder(".ethereal"), "conf.ini"),
Filename: path.Join(ethutil.ApplicationFolder(Datadir), "conf.ini"),
})
if err != nil {
fmt.Println(err)
} else {
g.ParseAll()
}
ethutil.ReadConfig(".ethereal", ethutil.LogFile|ethutil.LogStd, g, Identifier)
ethutil.ReadConfig(Datadir, ethutil.LogFile|ethutil.LogStd, g, Identifier)
// Instantiated a eth stack
ethereum, err := eth.New(eth.CapDefault, UseUPnP)