core: use dao-binded cache for native contracts

All native cached values are binded to DAO, so that it's possible
to properly handle historic calls.
This commit is contained in:
Anna Shaleva 2022-04-12 17:29:11 +03:00
parent 812fa3f76a
commit aa886f67ce
16 changed files with 475 additions and 282 deletions

View file

@ -1840,7 +1840,7 @@ func (s *Server) runScriptInVM(t trigger.Type, script []byte, contractScriptHash
err = s.chain.InitVerificationContext(ic, contractScriptHash, &transaction.Witness{InvocationScript: script, VerificationScript: []byte{}})
if err != nil {
return nil, response.NewInternalServerError("can't prepare verification VM", err)
return nil, response.NewInternalServerError(fmt.Sprintf("can't prepare verification VM: %s", err.Error()), err)
}
} else {
ic.VM.LoadScriptWithFlags(script, callflag.All)