Commit b095bd32 authored by obscuren's avatar obscuren

events should be set prior to calling mainloop

parent 1d3f43f0
...@@ -67,7 +67,7 @@ func defaultAssetPath() string { ...@@ -67,7 +67,7 @@ func defaultAssetPath() string {
// assume a debug build and use the source directory as // assume a debug build and use the source directory as
// asset directory. // asset directory.
pwd, _ := os.Getwd() pwd, _ := os.Getwd()
if pwd == path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "mist") { if pwd == path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist") {
assetPath = path.Join(pwd, "assets") assetPath = path.Join(pwd, "assets")
} else { } else {
switch runtime.GOOS { switch runtime.GOOS {
......
...@@ -41,7 +41,7 @@ func (jsre *JSRE) LoadExtFile(path string) { ...@@ -41,7 +41,7 @@ func (jsre *JSRE) LoadExtFile(path string) {
} }
func (jsre *JSRE) LoadIntFile(file string) { func (jsre *JSRE) LoadIntFile(file string) {
assetPath := path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "mist", "assets", "ext") assetPath := path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist", "assets", "ext")
jsre.LoadExtFile(path.Join(assetPath, file)) jsre.LoadExtFile(path.Join(assetPath, file))
} }
...@@ -62,13 +62,13 @@ func NewJSRE(ethereum *eth.Ethereum) *JSRE { ...@@ -62,13 +62,13 @@ func NewJSRE(ethereum *eth.Ethereum) *JSRE {
re.LoadIntFile("string.js") re.LoadIntFile("string.js")
re.LoadIntFile("big.js") re.LoadIntFile("big.js")
// We have to make sure that, whoever calls this, calls "Stop"
go re.mainLoop()
// Subscribe to events // Subscribe to events
mux := ethereum.EventMux() mux := ethereum.EventMux()
re.events = mux.Subscribe(ethchain.NewBlockEvent{}) re.events = mux.Subscribe(ethchain.NewBlockEvent{})
// We have to make sure that, whoever calls this, calls "Stop"
go re.mainLoop()
re.Bind("eth", &JSEthereum{re.pipe, re.Vm, ethereum}) re.Bind("eth", &JSEthereum{re.pipe, re.Vm, ethereum})
re.initStdFuncs() re.initStdFuncs()
......
...@@ -192,7 +192,7 @@ func DefaultAssetPath() string { ...@@ -192,7 +192,7 @@ func DefaultAssetPath() string {
// assume a debug build and use the source directory as // assume a debug build and use the source directory as
// asset directory. // asset directory.
pwd, _ := os.Getwd() pwd, _ := os.Getwd()
if pwd == path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "mist") { if pwd == path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "cmd", "mist") {
assetPath = path.Join(pwd, "assets") assetPath = path.Join(pwd, "assets")
} else { } else {
switch runtime.GOOS { switch runtime.GOOS {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment