From 304b9ad3d4cdb76dd043ffdbd99ff30cb9d5cc2d Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 16 Mar 2021 22:47:49 +0300 Subject: [PATCH] contract: disable notifications for safe methods See neo-project/neo#2339. --- pkg/core/interop/contract/call.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/interop/contract/call.go b/pkg/core/interop/contract/call.go index 2bb689138b..45963931bc 100644 --- a/pkg/core/interop/contract/call.go +++ b/pkg/core/interop/contract/call.go @@ -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 {