core, core/vm: added structure logging

This also reduces the time required spend in the VM
This commit is contained in:
obscuren
2015-06-10 12:23:49 +02:00
parent ff5b3ef087
commit 38c61f6f25
9 changed files with 104 additions and 149 deletions

View File

@@ -27,9 +27,8 @@ type Env struct {
difficulty *big.Int
gasLimit *big.Int
logs state.Logs
vmTest bool
logs []vm.StructLog
}
func NewEnv(state *state.StateDB) *Env {
@@ -38,6 +37,14 @@ func NewEnv(state *state.StateDB) *Env {
}
}
func (self *Env) StructLogs() []vm.StructLog {
return self.logs
}
func (self *Env) AddStructLog(log vm.StructLog) {
self.logs = append(self.logs, log)
}
func NewEnvFromMap(state *state.StateDB, envValues map[string]string, exeValues map[string]string) *Env {
env := NewEnv(state)