aboutsummaryrefslogtreecommitdiffstats
path: root/xeth
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 /xeth
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 'xeth')
-rw-r--r--xeth/hexface.go8
1 files changed, 4 insertions, 4 deletions
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 {