Skip to content

Commit

Permalink
contract: disable notifications for safe methods
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-khimov committed Mar 16, 2021
1 parent 025330f commit 304b9ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/core/interop/contract/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func callInternal(ic *interop.Context, cs *state.Contract, name string, f callfl
hasReturn bool, args []stackitem.Item) error {
md := cs.Manifest.ABI.GetMethod(name, len(args))
if md.Safe {
f &^= callflag.WriteStates
f &^= (callflag.WriteStates | callflag.AllowNotify)
} else if ctx := ic.VM.Context(); ctx != nil && ctx.IsDeployed() {
curr, err := ic.GetContract(ic.VM.GetCurrentScriptHash())
if err == nil {
Expand Down

0 comments on commit 304b9ad

Please sign in to comment.