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

Function OnFinalize

protocol/txvm/option.go:27–31  ·  view source on GitHub ↗

OnFinalize can be passed as an option to Validate. It adds a callback to be invoked when "finalize" is executed.

(h ...func(*VM))

Source from the content-addressed store, hash-verified

25// OnFinalize can be passed as an option to Validate. It adds a
26// callback to be invoked when "finalize" is executed.
27func 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.

Callers 3

TestOptionsFunction · 0.92
NewTxFunction · 0.92
mainFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestOptionsFunction · 0.74