aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-03-06 09:46:56 +0800
committerFelix Lange <fjl@twurst.com>2015-03-06 09:46:56 +0800
commitbdba044a8031d810555196cde1b97792fa2b8084 (patch)
tree4da485f83721176155a62b021ac2616de1929730 /cmd/mist
parentc47866d25174bd783ee6bcd5b400d81d7bf598bb (diff)
downloadgo-tangerine-bdba044a8031d810555196cde1b97792fa2b8084.tar.gz
go-tangerine-bdba044a8031d810555196cde1b97792fa2b8084.tar.zst
go-tangerine-bdba044a8031d810555196cde1b97792fa2b8084.zip
ethutil: remove Config variable
Various functions throughout the codebase used it to grab settings. This has to stop because I want to use them without reading the config file. These functions can now be used without reading the config first: * ethdb.NewLDBDatabase * ethrepl.NewJSRepl * vm.New
Diffstat (limited to 'cmd/mist')
-rw-r--r--cmd/mist/bindings.go4
-rw-r--r--cmd/mist/gui.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd/mist/bindings.go b/cmd/mist/bindings.go
index 9623538a3..f21aa3135 100644
--- a/cmd/mist/bindings.go
+++ b/cmd/mist/bindings.go
@@ -79,14 +79,14 @@ func (self *Gui) AddPlugin(pluginPath string) {
self.plugins[pluginPath] = plugin{Name: pluginPath, Path: pluginPath}
json, _ := json.MarshalIndent(self.plugins, "", " ")
- ethutil.WriteFile(ethutil.Config.ExecPath+"/plugins.json", json)
+ ethutil.WriteFile(self.eth.DataDir+"/plugins.json", json)
}
func (self *Gui) RemovePlugin(pluginPath string) {
delete(self.plugins, pluginPath)
json, _ := json.MarshalIndent(self.plugins, "", " ")
- ethutil.WriteFile(ethutil.Config.ExecPath+"/plugins.json", json)
+ ethutil.WriteFile(self.eth.DataDir+"/plugins.json", json)
}
// this extra function needed to give int typecast value to gui widget
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go
index cbd8daf2f..5f444dd95 100644
--- a/cmd/mist/gui.go
+++ b/cmd/mist/gui.go
@@ -100,7 +100,7 @@ func NewWindow(ethereum *eth.Ethereum, config *ethutil.ConfigManager, session st
plugins: make(map[string]plugin),
serviceEvents: make(chan ServEv, 1),
}
- data, _ := ethutil.ReadAllFile(path.Join(ethutil.Config.ExecPath, "plugins.json"))
+ data, _ := ethutil.ReadAllFile(path.Join(ethereum.DataDir, "plugins.json"))
json.Unmarshal([]byte(data), &gui.plugins)
return gui