rpc: set transaction's script for test invocation
GetScriptContainer() interop can try to get this transaction and this attempt will lead to hash calculation with transaction serialization, but transaction can't be successfully serialized if it doesn't have a script set, so this makes test invocations fail.
This commit is contained in:
parent
4c23aa1d7c
commit
5ba4f3ef08
1 changed files with 2 additions and 0 deletions
|
@ -833,6 +833,7 @@ func (s *Server) invokeFunction(reqParams request.Params) (interface{}, *respons
|
|||
if err != nil {
|
||||
return nil, response.NewInternalServerError("can't create invocation script", err)
|
||||
}
|
||||
tx.Script = script
|
||||
return s.runScriptInVM(script, tx), nil
|
||||
}
|
||||
|
||||
|
@ -855,6 +856,7 @@ func (s *Server) invokescript(reqParams request.Params) (interface{}, *response.
|
|||
}
|
||||
tx.Cosigners = cosigners
|
||||
}
|
||||
tx.Script = script
|
||||
return s.runScriptInVM(script, tx), nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue