From 664a2a88eb0e57689c83d83725da769dde809d15 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 15 Feb 2021 15:03:32 +0300 Subject: [PATCH] core: allow call in verification --- pkg/core/blockchain.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 4e9ef7e16..12055557e 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -1767,7 +1767,7 @@ func (bc *Blockchain) initVerificationVM(ic *interop.Context, hash util.Uint160, if err != nil { return fmt.Errorf("%w: %v", ErrInvalidVerification, err) } - v.LoadScriptWithFlags(witness.VerificationScript, callflag.ReadStates) + v.LoadScriptWithFlags(witness.VerificationScript, callflag.ReadOnly) } else { cs, err := ic.GetContract(hash) if err != nil { @@ -1778,7 +1778,7 @@ func (bc *Blockchain) initVerificationVM(ic *interop.Context, hash util.Uint160, return ErrInvalidVerificationContract } initMD := cs.Manifest.ABI.GetMethod(manifest.MethodInit, 0) - v.LoadScriptWithHash(cs.NEF.Script, hash, callflag.ReadStates) + v.LoadScriptWithHash(cs.NEF.Script, hash, callflag.ReadOnly) v.Context().NEF = &cs.NEF v.Jump(v.Context(), md.Offset)