aboutsummaryrefslogtreecommitdiffstats
path: root/javascript
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-24 01:35:36 +0800
committerobscuren <geffobscura@gmail.com>2014-12-24 01:35:36 +0800
commit780abaec988df302e0c98f1a35e9af35b5623746 (patch)
treedfd26765ec08d3df756730bb186639edb388b4ee /javascript
parent1054c155db8ac59b97b81fa7a7a20f2239eb1e82 (diff)
downloadgo-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.tar
go-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.tar.gz
go-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.tar.bz2
go-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.tar.lz
go-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.tar.xz
go-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.tar.zst
go-tangerine-780abaec988df302e0c98f1a35e9af35b5623746.zip
Switched to new trie
Diffstat (limited to 'javascript')
-rw-r--r--javascript/types.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/javascript/types.go b/javascript/types.go
index cf5a6677b..ce1d9995a 100644
--- a/javascript/types.go
+++ b/javascript/types.go
@@ -18,11 +18,11 @@ type JSStateObject struct {
func (self *JSStateObject) EachStorage(call otto.FunctionCall) otto.Value {
cb := call.Argument(0)
- self.JSObject.EachStorage(func(key string, value *ethutil.Value) {
- value.Decode()
- cb.Call(self.eth.toVal(self), self.eth.toVal(key), self.eth.toVal(ethutil.Bytes2Hex(value.Bytes())))
- })
+ it := self.JSObject.Trie().Iterator()
+ for it.Next() {
+ cb.Call(self.eth.toVal(self), self.eth.toVal(ethutil.Bytes2Hex(it.Key)), self.eth.toVal(ethutil.Bytes2Hex(it.Value)))
+ }
return otto.UndefinedValue()
}