From ca747f268800590ee855b1ce593b61e95d073311 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 11 Apr 2014 08:28:30 -0400 Subject: Added the possibility for debug hooks during closure call --- ethchain/closure.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ethchain/closure.go') diff --git a/ethchain/closure.go b/ethchain/closure.go index 8e57a0d03..3d15f2a99 100644 --- a/ethchain/closure.go +++ b/ethchain/closure.go @@ -69,10 +69,12 @@ func (c *Closure) Address() []byte { return c.object.Address() } -func (c *Closure) Call(vm *Vm, args []byte) []byte { +type DebugHook func(op OpCode) + +func (c *Closure) Call(vm *Vm, args []byte, hook DebugHook) []byte { c.Args = args - return vm.RunClosure(c) + return vm.RunClosure(c, hook) } func (c *Closure) Return(ret []byte) []byte { -- cgit v1.2.3