core/state, core/types use package rlp for state, receipt serialisation

This commit is contained in:
Felix Lange
2015-12-11 01:29:41 +01:00
parent 9be5d5cd90
commit 1b89bd5d26
5 changed files with 67 additions and 71 deletions

View File

@@ -45,7 +45,7 @@ func (self *StateDB) RawDump() World {
it := self.trie.Iterator()
for it.Next() {
addr := self.trie.GetKey(it.Key)
stateObject := NewStateObjectFromBytes(common.BytesToAddress(addr), it.Value, self.db)
stateObject, _ := DecodeObject(common.BytesToAddress(addr), self.db, it.Value)
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)