vm: extract shared parts of the Context
Local calls reuse them, cross-contract calls create new ones. This allows to avoid some allocations and use a little less memory.
This commit is contained in:
parent
e5c59f8ddd
commit
13f5fdbe8a
7 changed files with 112 additions and 108 deletions
|
@ -73,7 +73,7 @@ func Notify(ic *interop.Context) error {
|
|||
if len(name) > MaxEventNameLen {
|
||||
return fmt.Errorf("event name must be less than %d", MaxEventNameLen)
|
||||
}
|
||||
if ic.VM.Context().NEF == nil {
|
||||
if !ic.VM.Context().IsDeployed() {
|
||||
return errors.New("notifications are not allowed in dynamic scripts")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue