From 93e12250c702521807247a66d74cc0792370d83b Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 20 May 2014 22:12:42 +0200 Subject: [PATCH] Switch variables as intended --- ethereum/javascript_runtime.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethereum/javascript_runtime.go b/ethereum/javascript_runtime.go index 76ced3f3d..fa01c7005 100644 --- a/ethereum/javascript_runtime.go +++ b/ethereum/javascript_runtime.go @@ -101,7 +101,7 @@ out: cb.Call(cb, val) } } else if storageObject, ok := object.Resource.(*ethchain.StorageState); ok { - for _, cb := range self.objectCb[ethutil.Hex(storageObject.Address)+ethutil.Hex(storageObject.StateAddress)] { + for _, cb := range self.objectCb[ethutil.Hex(storageObject.StateAddress)+ethutil.Hex(storageObject.Address)] { val, _ := self.vm.ToValue(ethpub.NewPStorageState(storageObject)) cb.Call(cb, val) } @@ -115,7 +115,7 @@ func (self *JSRE) initStdFuncs() { eth := t.Object() eth.Set("watch", self.watch) eth.Set("addPeer", self.addPeer) - self.Set("require", self.require) + eth.Set("require", self.require) } /*