From f249ccaa89afa3340c3abd8578516b648e633e96 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 10 Jun 2015 16:46:43 +0200 Subject: [PATCH] cmd/evm: implements vm.Environment --- cmd/evm/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 561f1a943c..599721c89e 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -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) }