aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/closure.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-04-11 20:28:30 +0800
committerobscuren <geffobscura@gmail.com>2014-04-11 20:28:30 +0800
commitca747f268800590ee855b1ce593b61e95d073311 (patch)
tree22c5aa975cec4835923a9ac752c1d243108c0c8f /ethchain/closure.go
parent7d6ba88d2b4a263f2a898c3ef6d40e5258f96bb0 (diff)
downloaddexon-ca747f268800590ee855b1ce593b61e95d073311.tar.gz
dexon-ca747f268800590ee855b1ce593b61e95d073311.tar.zst
dexon-ca747f268800590ee855b1ce593b61e95d073311.zip
Added the possibility for debug hooks during closure call
Diffstat (limited to 'ethchain/closure.go')
-rw-r--r--ethchain/closure.go6
1 files changed, 4 insertions, 2 deletions
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 {