From 2e39efbe7c487fd605de0f6915bcae789138fb7e Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 24 Jul 2014 12:34:48 +0200 Subject: [PATCH] New State object --- ethereum/repl/javascript_runtime.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ethereum/repl/javascript_runtime.go b/ethereum/repl/javascript_runtime.go index cd87f98687..41b6216d49 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)