Commit f249ccaa authored by obscuren's avatar obscuren

cmd/evm: implements vm.Environment

parent cf3aabb9
...@@ -104,6 +104,7 @@ type VMEnv struct { ...@@ -104,6 +104,7 @@ type VMEnv struct {
depth int depth int
Gas *big.Int Gas *big.Int
time int64 time int64
logs []vm.StructLog
} }
func NewEnv(state *state.StateDB, transactor common.Address, value *big.Int) *VMEnv { func NewEnv(state *state.StateDB, transactor common.Address, value *big.Int) *VMEnv {
...@@ -133,6 +134,12 @@ func (self *VMEnv) GetHash(n uint64) common.Hash { ...@@ -133,6 +134,12 @@ func (self *VMEnv) GetHash(n uint64) common.Hash {
} }
return common.Hash{} return common.Hash{}
} }
func (self *VMEnv) AddStructLog(log vm.StructLog) {
self.logs = append(self.logs, log)
}
func (self *VMEnv) StructLogs() []vm.StructLog {
return self.logs
}
func (self *VMEnv) AddLog(log *state.Log) { func (self *VMEnv) AddLog(log *state.Log) {
self.state.AddLog(log) self.state.AddLog(log)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment