AfterStep can be passed as an option to Validate. It adds a callback to be invoked after each instruction is executed.
(h ...func(*VM))
| 41 | // AfterStep can be passed as an option to Validate. It adds a |
| 42 | // callback to be invoked after each instruction is executed. |
| 43 | func AfterStep(h ...func(*VM)) Option { |
| 44 | return Option{ |
| 45 | apply: func(vm *VM) { vm.afterStep = append(vm.afterStep, h...) }, |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | // StopAfterFinalize can be passed as an option to Validate. It causes |
| 50 | // execution to terminate after a "finalize" instruction, without |