aboutsummaryrefslogtreecommitdiffstats
path: root/state
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-01 02:15:57 +0800
committerobscuren <geffobscura@gmail.com>2015-03-01 02:15:57 +0800
commit6ea7aae29ca71e6fe857b85296b574e09df57184 (patch)
tree3b5a4ee4aad751ec3166005135771f6721f877ff /state
parentcc5c8a444dbc23501ba1a131eb2334f4b5e1ce9f (diff)
downloadgo-tangerine-6ea7aae29ca71e6fe857b85296b574e09df57184.tar
go-tangerine-6ea7aae29ca71e6fe857b85296b574e09df57184.tar.gz
go-tangerine-6ea7aae29ca71e6fe857b85296b574e09df57184.tar.bz2
go-tangerine-6ea7aae29ca71e6fe857b85296b574e09df57184.tar.lz
go-tangerine-6ea7aae29ca71e6fe857b85296b574e09df57184.tar.xz
go-tangerine-6ea7aae29ca71e6fe857b85296b574e09df57184.tar.zst
go-tangerine-6ea7aae29ca71e6fe857b85296b574e09df57184.zip
Removed some methods from the JS REPL
Diffstat (limited to 'state')
-rw-r--r--state/dump.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/state/dump.go b/state/dump.go
index 073f89414..2c611d76b 100644
--- a/state/dump.go
+++ b/state/dump.go
@@ -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)
}