forked from TrueCloudLab/neoneo-go
core: allow to read states for non-contract verifications
C# does it this way now: callFlags = !witness.VerificationScript.IsStandardContract() ? CallFlags.ReadStates : CallFlags.None So non-standard scripts _always_ have access to state and standards ones just don't care (their code is known and it doesn't touch state).
This commit is contained in:
parent
ac527650eb
commit
ed3cef81cc
1 changed files with 1 additions and 1 deletions
|
@ -1744,7 +1744,7 @@ func (bc *Blockchain) initVerificationVM(ic *interop.Context, hash util.Uint160,
|
||||||
if bc.contracts.ByHash(hash) != nil {
|
if bc.contracts.ByHash(hash) != nil {
|
||||||
return ErrNativeContractWitness
|
return ErrNativeContractWitness
|
||||||
}
|
}
|
||||||
v.LoadScriptWithFlags(witness.VerificationScript, callflag.NoneFlag)
|
v.LoadScriptWithFlags(witness.VerificationScript, callflag.ReadStates)
|
||||||
} else {
|
} else {
|
||||||
cs, err := ic.GetContract(hash)
|
cs, err := ic.GetContract(hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue