From 14e2e488fdf0f4d6ed1a5a48ffbbe883faa7edb6 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 19 Nov 2014 12:25:52 +0100 Subject: Added `chain` tests & minor fixes * Fork tests (equal and larger chains) * `chain.link` fields are now exported * moved debug function from state to dump.go --- state/dump.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'state/dump.go') diff --git a/state/dump.go b/state/dump.go index be3b362c4..186c6dd73 100644 --- a/state/dump.go +++ b/state/dump.go @@ -46,3 +46,11 @@ func (self *State) Dump() []byte { return json } + +// Debug stuff +func (self *StateObject) CreateOutputForDiff() { + fmt.Printf("%x %x %x %x\n", self.Address(), self.State.Root(), self.balance.Bytes(), self.Nonce) + self.EachStorage(func(addr string, value *ethutil.Value) { + fmt.Printf("%x %x\n", addr, value.Bytes()) + }) +} -- cgit