Removed some methods from the JS REPL

This commit is contained in:
obscuren
2015-02-28 19:15:57 +01:00
parent cc5c8a444d
commit 6ea7aae29c
7 changed files with 25 additions and 54 deletions

View File

@ -20,7 +20,7 @@ type World struct {
Accounts map[string]Account `json:"accounts"`
}
func (self *StateDB) Dump() []byte {
func (self *StateDB) RawDump() World {
world := World{
Root: ethutil.Bytes2Hex(self.trie.Root()),
Accounts: make(map[string]Account),
@ -39,8 +39,11 @@ func (self *StateDB) Dump() []byte {
}
world.Accounts[ethutil.Bytes2Hex(it.Key)] = account
}
return world
}
json, err := json.MarshalIndent(world, "", " ")
func (self *StateDB) Dump() []byte {
json, err := json.MarshalIndent(self.RawDump(), "", " ")
if err != nil {
fmt.Println("dump err", err)
}