mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-03 23:19:44 +00:00
core: allow call in verification
This commit is contained in:
parent
7127b93d06
commit
664a2a88eb
1 changed files with 2 additions and 2 deletions
|
@ -1767,7 +1767,7 @@ func (bc *Blockchain) initVerificationVM(ic *interop.Context, hash util.Uint160,
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("%w: %v", ErrInvalidVerification, err)
|
return fmt.Errorf("%w: %v", ErrInvalidVerification, err)
|
||||||
}
|
}
|
||||||
v.LoadScriptWithFlags(witness.VerificationScript, callflag.ReadStates)
|
v.LoadScriptWithFlags(witness.VerificationScript, callflag.ReadOnly)
|
||||||
} else {
|
} else {
|
||||||
cs, err := ic.GetContract(hash)
|
cs, err := ic.GetContract(hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -1778,7 +1778,7 @@ func (bc *Blockchain) initVerificationVM(ic *interop.Context, hash util.Uint160,
|
||||||
return ErrInvalidVerificationContract
|
return ErrInvalidVerificationContract
|
||||||
}
|
}
|
||||||
initMD := cs.Manifest.ABI.GetMethod(manifest.MethodInit, 0)
|
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.Context().NEF = &cs.NEF
|
||||||
v.Jump(v.Context(), md.Offset)
|
v.Jump(v.Context(), md.Offset)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue