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
This commit is contained in:
obscuren
2014-11-19 12:25:52 +01:00
parent 437d79f094
commit 14e2e488fd
6 changed files with 2751 additions and 740 deletions

View File

@ -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())
})
}