conversion state

This commit is contained in:
obscuren
2015-03-16 17:09:08 +01:00
parent 76f215b0fe
commit e620bde405
6 changed files with 40 additions and 36 deletions

View File

@@ -28,7 +28,8 @@ func (self *StateDB) RawDump() World {
it := self.trie.Iterator()
for it.Next() {
stateObject := NewStateObjectFromBytes(it.Key, it.Value, self.db)
fmt.Printf("%x\n", it.Key, len(it.Key))
stateObject := NewStateObjectFromBytes(common.BytesToAddress(it.Key), it.Value, self.db)
account := Account{Balance: stateObject.balance.String(), Nonce: stateObject.nonce, Root: common.Bytes2Hex(stateObject.Root()), CodeHash: common.Bytes2Hex(stateObject.codeHash)}
account.Storage = make(map[string]string)