aboutsummaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
Diffstat (limited to 'vm')
-rw-r--r--vm/environment.go2
-rw-r--r--vm/vm_debug.go4
2 files changed, 4 insertions, 2 deletions
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))