interop/runtime: disable notifications in dynamic scripts
That are only entry scripts today. See neo-project/neo#2796.
This commit is contained in:
parent
1ff588a11b
commit
e5c59f8ddd
2 changed files with 16 additions and 1 deletions
|
@ -73,6 +73,10 @@ 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 {
|
||||
return errors.New("notifications are not allowed in dynamic scripts")
|
||||
}
|
||||
|
||||
// But it has to be serializable, otherwise we either have some broken
|
||||
// (recursive) structure inside or an interop item that can't be used
|
||||
// outside of the interop subsystem anyway.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue