mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-29 23:33:37 +00:00
vm: omit context parameter from Call()
It's not used and should not be used to switch from contract to contract.
This commit is contained in:
parent
7b713762be
commit
765235eca3
5 changed files with 6 additions and 6 deletions
|
@ -89,7 +89,7 @@ func invokeMethod(t *testing.T, method string, script []byte, v *vm.VM, di *comp
|
|||
v.LoadScriptWithFlags(script, callflag.All)
|
||||
v.Context().Jump(mainOffset)
|
||||
if initOffset >= 0 {
|
||||
v.Call(v.Context(), initOffset)
|
||||
v.Call(initOffset)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2191,7 +2191,7 @@ func (bc *Blockchain) InitVerificationVM(v *vm.VM, getContract func(util.Uint160
|
|||
v.Context().Jump(md.Offset)
|
||||
|
||||
if initMD != nil {
|
||||
v.Call(v.Context(), initMD.Offset)
|
||||
v.Call(initMD.Offset)
|
||||
}
|
||||
}
|
||||
if len(witness.InvocationScript) != 0 {
|
||||
|
|
|
@ -123,7 +123,7 @@ func callExFromNative(ic *interop.Context, caller util.Uint160, cs *state.Contra
|
|||
|
||||
md = cs.Manifest.ABI.GetMethod(manifest.MethodInit, 0)
|
||||
if md != nil {
|
||||
ic.VM.Call(ic.VM.Context(), md.Offset)
|
||||
ic.VM.Call(md.Offset)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -460,7 +460,7 @@ func handleRun(c *ishell.Context) {
|
|||
}
|
||||
v.Context().Jump(offset)
|
||||
if initMD := m.ABI.GetMethod(manifest.MethodInit, 0); initMD != nil {
|
||||
v.Call(v.Context(), initMD.Offset)
|
||||
v.Call(initMD.Offset)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1557,8 +1557,8 @@ func (v *VM) throw(item stackitem.Item) {
|
|||
}
|
||||
|
||||
// Call calls method by offset using new execution context.
|
||||
func (v *VM) Call(ctx *Context, offset int) {
|
||||
v.call(ctx, offset)
|
||||
func (v *VM) Call(offset int) {
|
||||
v.call(v.Context(), offset)
|
||||
}
|
||||
|
||||
// call is an internal representation of Call, which does not
|
||||
|
|
Loading…
Reference in a new issue