core: add callback to VM context

This commit is contained in:
Anna Shaleva 2020-11-24 15:45:14 +03:00
parent c9acc43023
commit 0f68528095
7 changed files with 19 additions and 7 deletions

View file

@ -45,6 +45,14 @@ type Context struct {
// Call flags this context was created with.
callFlag smartcontract.CallFlag
// InvocationState contains expected return type and actions to be performed on context unload.
InvocationState
}
// InvocationState contains return convention and callback to be executed on context unload.
type InvocationState struct {
// Callback is executed on context unload.
Callback func(ctx *Context)
// CheckReturn specifies if amount of return values needs to be checked.
CheckReturn CheckReturnState
}