mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
fix evm --dump to include storage
This commit is contained in:
parent
3d32690b54
commit
60bf0329a9
1 changed files with 3 additions and 2 deletions
|
|
@ -62,9 +62,10 @@ func (self *StateDB) RawDump() Dump {
|
|||
Code: common.Bytes2Hex(obj.Code(self.db)),
|
||||
Storage: make(map[string]string),
|
||||
}
|
||||
storageIt := trie.NewIterator(obj.getTrie(self.db).NodeIterator(nil))
|
||||
so := self.getStateObject(common.BytesToAddress(addr))
|
||||
storageIt := trie.NewIterator(so.getTrie(self.db).NodeIterator(nil))
|
||||
for storageIt.Next() {
|
||||
account.Storage[common.Bytes2Hex(self.trie.GetKey(storageIt.Key))] = common.Bytes2Hex(storageIt.Value)
|
||||
account.Storage[common.Bytes2Hex(so.getTrie(self.db).GetKey(storageIt.Key))] = common.Bytes2Hex(storageIt.Value)
|
||||
}
|
||||
dump.Accounts[common.Bytes2Hex(addr)] = account
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue