Dump bytes instead of strings

This commit is contained in:
obscuren
2014-08-17 12:42:32 +02:00
parent 4008ff32c9
commit 793e666f36
2 changed files with 28 additions and 11 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ type World struct {
Accounts map[string]Account `json:"accounts"`
}
func (self *State) Dump() string {
func (self *State) Dump() []byte {
world := World{
Root: ethutil.Bytes2Hex(self.Trie.Root.([]byte)),
Accounts: make(map[string]Account),
@@ -43,5 +43,5 @@ func (self *State) Dump() string {
fmt.Println("dump err", err)
}
return string(json)
return json
}