From 780abaec988df302e0c98f1a35e9af35b5623746 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 23 Dec 2014 18:35:36 +0100 Subject: Switched to new trie --- xeth/hexface.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xeth') diff --git a/xeth/hexface.go b/xeth/hexface.go index 6c084f947..c3d8cef86 100644 --- a/xeth/hexface.go +++ b/xeth/hexface.go @@ -138,10 +138,10 @@ type KeyVal struct { func (self *JSXEth) EachStorage(addr string) string { var values []KeyVal object := self.World().SafeGet(ethutil.Hex2Bytes(addr)) - object.EachStorage(func(name string, value *ethutil.Value) { - value.Decode() - values = append(values, KeyVal{ethutil.Bytes2Hex([]byte(name)), ethutil.Bytes2Hex(value.Bytes())}) - }) + it := object.Trie().Iterator() + for it.Next() { + values = append(values, KeyVal{ethutil.Bytes2Hex(it.Key), ethutil.Bytes2Hex(it.Value)}) + } valuesJson, err := json.Marshal(values) if err != nil { -- cgit v1.2.3