MCPcopy Create free account
hub / github.com/chain/txvm / BeforeStep

Function BeforeStep

protocol/txvm/option.go:35–39  ·  view source on GitHub ↗

BeforeStep can be passed as an option to Validate. It adds a callback to be invoked just before each instruction is executed.

(h ...func(*VM))

Source from the content-addressed store, hash-verified

33// BeforeStep can be passed as an option to Validate. It adds a
34// callback to be invoked just before each instruction is executed.
35func BeforeStep(h ...func(*VM)) Option {
36 return Option{
37 apply: func(vm *VM) { vm.beforeStep = append(vm.beforeStep, h...) },
38 }
39}
40
41// AfterStep can be passed as an option to Validate. It adds a
42// callback to be invoked after each instruction is executed.

Callers 2

TestOptionsFunction · 0.92
NewTxFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestOptionsFunction · 0.74