aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum/repl/javascript_runtime.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2014-07-31 00:02:43 +0800
committerzelig <viktor.tron@gmail.com>2014-07-31 00:02:43 +0800
commit34e937c9761f963ac4d3c9781d72ae92e54c0761 (patch)
tree9a4c78944acd6ee924eb86916f32d508de0b66a6 /ethereum/repl/javascript_runtime.go
parent2f5c95610feb77dd714bf9295d6127bef58f31bc (diff)
parent834803f1e8ce45040045359185c8b8d75f63de2c (diff)
downloaddexon-34e937c9761f963ac4d3c9781d72ae92e54c0761.tar
dexon-34e937c9761f963ac4d3c9781d72ae92e54c0761.tar.gz
dexon-34e937c9761f963ac4d3c9781d72ae92e54c0761.tar.bz2
dexon-34e937c9761f963ac4d3c9781d72ae92e54c0761.tar.lz
dexon-34e937c9761f963ac4d3c9781d72ae92e54c0761.tar.xz
dexon-34e937c9761f963ac4d3c9781d72ae92e54c0761.tar.zst
dexon-34e937c9761f963ac4d3c9781d72ae92e54c0761.zip
merge upstream
Diffstat (limited to 'ethereum/repl/javascript_runtime.go')
-rw-r--r--ethereum/repl/javascript_runtime.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/ethereum/repl/javascript_runtime.go b/ethereum/repl/javascript_runtime.go
index 091e758e1..f5aea2dd9 100644
--- a/ethereum/repl/javascript_runtime.go
+++ b/ethereum/repl/javascript_runtime.go
@@ -7,6 +7,7 @@ import (
"github.com/ethereum/eth-go/ethlog"
"github.com/ethereum/eth-go/ethpub"
"github.com/ethereum/eth-go/ethreact"
+ "github.com/ethereum/eth-go/ethstate"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/go-ethereum/utils"
"github.com/obscuren/otto"
@@ -67,7 +68,7 @@ func NewJSRE(ethereum *eth.Ethereum) *JSRE {
// Subscribe to events
reactor := ethereum.Reactor()
- reactor.Subscribe("newBlock", self.blockChan)
+ reactor.Subscribe("newBlock", re.blockChan)
re.Bind("eth", &JSEthereum{re.lib, re.vm})
@@ -122,12 +123,12 @@ out:
if _, ok := block.Resource.(*ethchain.Block); ok {
}
case object := <-self.changeChan:
- if stateObject, ok := object.Resource.(*ethchain.StateObject); ok {
+ if stateObject, ok := object.Resource.(*ethstate.StateObject); ok {
for _, cb := range self.objectCb[ethutil.Bytes2Hex(stateObject.Address())] {
val, _ := self.vm.ToValue(ethpub.NewPStateObject(stateObject))
cb.Call(cb, val)
}
- } else if storageObject, ok := object.Resource.(*ethchain.StorageState); ok {
+ } else if storageObject, ok := object.Resource.(*ethstate.StorageState); ok {
for _, cb := range self.objectCb[ethutil.Bytes2Hex(storageObject.StateAddress)+ethutil.Bytes2Hex(storageObject.Address)] {
val, _ := self.vm.ToValue(ethpub.NewPStorageState(storageObject))
cb.Call(cb, val)