mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 04:03:49 +00:00
cmd/evm: implements vm.Environment
This commit is contained in:
parent
cf3aabb9d3
commit
f249ccaa89
@ -104,6 +104,7 @@ type VMEnv struct {
|
||||
depth int
|
||||
Gas *big.Int
|
||||
time int64
|
||||
logs []vm.StructLog
|
||||
}
|
||||
|
||||
func NewEnv(state *state.StateDB, transactor common.Address, value *big.Int) *VMEnv {
|
||||
@ -133,6 +134,12 @@ func (self *VMEnv) GetHash(n uint64) 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) {
|
||||
self.state.AddLog(log)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user