native: don't push void result in Call
This was done in https://github.com/neo-project/neo/pull/1693 for native calls. `OnPersist` script still uses `DROP` though as value is pushed via `CheckReturn` logic for regular calls.
This commit is contained in:
parent
877b8ece63
commit
30526046e7
3 changed files with 7 additions and 2 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/interop"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/state"
|
||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
||||
)
|
||||
|
||||
// Deploy deploys native contract.
|
||||
|
@ -62,6 +63,8 @@ func Call(ic *interop.Context) error {
|
|||
return errors.New("gas limit exceeded")
|
||||
}
|
||||
result := m.Func(ic, args)
|
||||
ic.VM.Estack().PushVal(result)
|
||||
if m.MD.ReturnType != smartcontract.VoidType {
|
||||
ic.VM.Estack().PushVal(result)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue