diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-27 19:32:31 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-27 19:32:31 +0800 |
commit | 4eb1771e67ee2c66d5fb86c2b5961d84e40f7dd0 (patch) | |
tree | e0b6207273705f7cfb88b9e8b4b4453ae9abd49a /ethchain/vm.go | |
parent | aba3066658a32723543f9e4eda74a14ef140fc0e (diff) | |
download | dexon-4eb1771e67ee2c66d5fb86c2b5961d84e40f7dd0.tar.gz dexon-4eb1771e67ee2c66d5fb86c2b5961d84e40f7dd0.tar.zst dexon-4eb1771e67ee2c66d5fb86c2b5961d84e40f7dd0.zip |
Hooks can now quit the vm
Diffstat (limited to 'ethchain/vm.go')
-rw-r--r-- | ethchain/vm.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ethchain/vm.go b/ethchain/vm.go index 0d9e8599e..9821a839a 100644 --- a/ethchain/vm.go +++ b/ethchain/vm.go @@ -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 + } } } } |