OnFinalize can be passed as an option to Validate. It adds a callback to be invoked when "finalize" is executed.
(h ...func(*VM))
| 25 | // OnFinalize can be passed as an option to Validate. It adds a |
| 26 | // callback to be invoked when "finalize" is executed. |
| 27 | func OnFinalize(h ...func(*VM)) Option { |
| 28 | return Option{ |
| 29 | apply: func(vm *VM) { vm.onFinalize = append(vm.onFinalize, h...) }, |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | // BeforeStep can be passed as an option to Validate. It adds a |
| 34 | // callback to be invoked just before each instruction is executed. |
no outgoing calls