Hooks can now quit the vm

This commit is contained in:
obscuren
2014-05-27 13:32:31 +02:00
parent aba3066658
commit 4eb1771e67
2 changed files with 4 additions and 2 deletions

View File

@ -543,7 +543,9 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro
pc.Add(pc, ethutil.Big1)
if hook != nil {
hook(step-1, op, mem, stack, closure.Object())
if !hook(step-1, op, mem, stack, closure.Object()) {
return nil, nil
}
}
}
}