rpc: allow to marshal Iterators for invoke* results

This commit is contained in:
Anna Shaleva 2021-04-28 17:46:34 +03:00
parent 4e55b1a9ed
commit 9eeebf481c
5 changed files with 108 additions and 21 deletions

View file

@ -1320,14 +1320,7 @@ func (s *Server) runScriptInVM(t trigger.Type, script []byte, contractScriptHash
if err != nil {
faultException = err.Error()
}
result := &result.Invoke{
State: vm.State().String(),
GasConsumed: vm.GasConsumed(),
Script: script,
Stack: vm.Estack().ToArray(),
FaultException: faultException,
}
return result, nil
return result.NewInvoke(vm, script, faultException, s.config.MaxIteratorResultItems), nil
}
// submitBlock broadcasts a raw block over the NEO network.