diff options
author | obscuren <geffobscura@gmail.com> | 2014-07-24 18:34:48 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-07-24 18:34:48 +0800 |
commit | 2e39efbe7c487fd605de0f6915bcae789138fb7e (patch) | |
tree | 1141beffce619b3fb11676019385312d92b27c00 | |
parent | a06a84d19b24da4005bc4d150f071ec4a703521b (diff) | |
download | dexon-2e39efbe7c487fd605de0f6915bcae789138fb7e.tar.gz dexon-2e39efbe7c487fd605de0f6915bcae789138fb7e.tar.zst dexon-2e39efbe7c487fd605de0f6915bcae789138fb7e.zip |
New State object
-rw-r--r-- | ethereum/repl/javascript_runtime.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ethereum/repl/javascript_runtime.go b/ethereum/repl/javascript_runtime.go index cd87f9868..41b6216d4 100644 --- a/ethereum/repl/javascript_runtime.go +++ b/ethereum/repl/javascript_runtime.go @@ -6,6 +6,7 @@ import ( "github.com/ethereum/eth-go/ethchain" "github.com/ethereum/eth-go/ethlog" "github.com/ethereum/eth-go/ethpub" + "github.com/ethereum/eth-go/ethstate" "github.com/ethereum/eth-go/ethutil" "github.com/ethereum/go-ethereum/utils" "github.com/obscuren/otto" @@ -121,12 +122,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) |