aboutsummaryrefslogtreecommitdiffstats
path: root/javascript
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-27 18:50:38 +0800
committerobscuren <geffobscura@gmail.com>2014-10-27 18:50:38 +0800
commitb095bd32371f02d204a4d0fbde75dc58baa7430d (patch)
tree2711b376e03855a096fe8d14f08c83c655192f1b /javascript
parent1d3f43f060e9ebb312fc3b17fc0fe43c8f95cd82 (diff)
downloadgo-tangerine-b095bd32371f02d204a4d0fbde75dc58baa7430d.tar.gz
go-tangerine-b095bd32371f02d204a4d0fbde75dc58baa7430d.tar.zst
go-tangerine-b095bd32371f02d204a4d0fbde75dc58baa7430d.zip
events should be set prior to calling mainloop
Diffstat (limited to 'javascript')
-rw-r--r--javascript/javascript_runtime.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/javascript/javascript_runtime.go b/javascript/javascript_runtime.go
index b0d7c81b5..704635d97 100644
--- a/javascript/javascript_runtime.go
+++ b/javascript/javascript_runtime.go
@@ -41,7 +41,7 @@ func (jsre *JSRE) LoadExtFile(path 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))
}
@@ -62,13 +62,13 @@ func NewJSRE(ethereum *eth.Ethereum) *JSRE {
re.LoadIntFile("string.js")
re.LoadIntFile("big.js")
- // We have to make sure that, whoever calls this, calls "Stop"
- go re.mainLoop()
-
// Subscribe to events
mux := ethereum.EventMux()
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.initStdFuncs()