aboutsummaryrefslogtreecommitdiffstats
path: root/xeth
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-30 06:58:43 +0800
committerobscuren <geffobscura@gmail.com>2015-01-30 06:58:43 +0800
commit54927dc0e0b99009f92fbb7b28d71ae20179ce1e (patch)
treea486e2b72ad098162459e978534341d39c035a68 /xeth
parent705cf6113d5c7cc8cbbbc8201d3c6ea04ae5726b (diff)
downloaddexon-54927dc0e0b99009f92fbb7b28d71ae20179ce1e.tar.gz
dexon-54927dc0e0b99009f92fbb7b28d71ae20179ce1e.tar.zst
dexon-54927dc0e0b99009f92fbb7b28d71ae20179ce1e.zip
Fixed issue with Storage()
* Storage() returned encoded values. They are now decode prior to hexing * Removed old code from state object * Updated coin
Diffstat (limited to 'xeth')
-rw-r--r--xeth/types.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/xeth/types.go b/xeth/types.go
index bee730ba1..34caf5cbc 100644
--- a/xeth/types.go
+++ b/xeth/types.go
@@ -1,6 +1,7 @@
package xeth
import (
+ "bytes"
"fmt"
"strings"
@@ -9,6 +10,7 @@ import (
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/p2p"
+ "github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/state"
)
@@ -54,8 +56,11 @@ func (self *Object) Storage() (storage map[string]string) {
it := self.StateObject.Trie().Iterator()
for it.Next() {
- storage[toHex(it.Key)] = toHex(it.Value)
+ var data []byte
+ rlp.Decode(bytes.NewReader(it.Value), &data)
+ storage[toHex(it.Key)] = toHex(data)
}
+ self.StateObject.Trie().PrintRoot()
return
}