From 6c9e503eb8d41d331d6a74e69539a06590072190 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 11 Nov 2014 22:51:26 +0100 Subject: Removed all implicit logging. Fixed gas issues and jump errors --- vm/environment.go | 2 +- vm/vm_debug.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'vm') diff --git a/vm/environment.go b/vm/environment.go index dea86c66c..5604989e1 100644 --- a/vm/environment.go +++ b/vm/environment.go @@ -20,7 +20,7 @@ type Environment interface { BlockHash() []byte GasLimit() *big.Int Transfer(from, to Account, amount *big.Int) error - AddLog(state.Log) + AddLog(*state.Log) } type Object interface { diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 2d34758f5..290eddda4 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -47,6 +47,8 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) { if r := recover(); r != nil { self.Endl() + closure.UseGas(closure.Gas) + ret = closure.Return(nil) err = fmt.Errorf("%v", r) @@ -735,7 +737,7 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) { for i := 0; i < n; i++ { topics[i] = stack.Pop().Bytes() } - self.env.AddLog(state.Log{closure.Address(), topics, data}) + self.env.AddLog(&state.Log{closure.Address(), topics, data}) case MLOAD: offset := stack.Pop() val := ethutil.BigD(mem.Get(offset.Int64(), 32)) -- cgit v1.2.3