core/vm: resolve circular dependency to debug vm storage

This commit is contained in:
Péter Szilágyi
2016-01-11 18:20:31 +02:00
parent 1b8566a7b1
commit 752c75fb21
4 changed files with 20 additions and 14 deletions

View File

@ -376,12 +376,9 @@ func (self *Vm) log(pc uint64, op OpCode, gas, cost *big.Int, memory *Memory, st
stck[i] = new(big.Int).Set(item)
}
storage := make(map[common.Hash][]byte)
/*
object := contract.self.(*state.StateObject)
object.EachStorage(func(k, v []byte) {
storage[common.BytesToHash(k)] = v
})
*/
contract.self.EachStorage(func(k, v []byte) {
storage[common.BytesToHash(k)] = v
})
self.env.AddStructLog(StructLog{pc, op, new(big.Int).Set(gas), cost, mem, stck, storage, err})
}
}