core: restrict verification scripts with CallFlags.None

Follow neo-project/neo#1776. Looks very suspicious to me as it severely limits
verification scripts, but we have to be compatible at this point.
This commit is contained in:
Roman Khimov 2020-08-05 19:17:48 +03:00
parent 4bbe863904
commit b7f89b0544

View file

@ -1463,7 +1463,7 @@ func (bc *Blockchain) verifyHashAgainstScript(hash util.Uint160, witness *transa
vm := interopCtx.SpawnVM() vm := interopCtx.SpawnVM()
vm.SetPriceGetter(getPrice) vm.SetPriceGetter(getPrice)
vm.GasLimit = gas vm.GasLimit = gas
vm.LoadScriptWithFlags(verification, smartcontract.ReadOnly) vm.LoadScriptWithFlags(verification, smartcontract.NoneFlag)
vm.LoadScript(witness.InvocationScript) vm.LoadScript(witness.InvocationScript)
if useKeys { if useKeys {
bc.keyCacheLock.RLock() bc.keyCacheLock.RLock()