From d1251b8daf41e4e4866518abc25f35532d3b6430 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 16 Mar 2021 22:48:32 +0300 Subject: [PATCH] core: don't limit on/postPersist methods They read/write/call/notify, so they need everything. --- pkg/core/blockchain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 96231efc0..25c2ad6d7 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -854,7 +854,7 @@ func (bc *Blockchain) IsExtensibleAllowed(u util.Uint160) bool { func (bc *Blockchain) runPersist(script []byte, block *block.Block, cache *dao.Cached, trig trigger.Type) (*state.AppExecResult, error) { systemInterop := bc.newInteropContext(trig, cache, block, nil) v := systemInterop.SpawnVM() - v.LoadScriptWithFlags(script, callflag.WriteStates|callflag.AllowCall) + v.LoadScriptWithFlags(script, callflag.All) v.SetPriceGetter(systemInterop.GetPrice) if err := v.Run(); err != nil { return nil, fmt.Errorf("VM has failed: %w", err)