rpc: fill transaction witnesses during invokescript handling

This commit is contained in:
Anna Shaleva 2021-09-09 17:26:53 +03:00
parent 61fd7bd6ba
commit b989fdb462

View file

@ -1281,11 +1281,12 @@ func (s *Server) invokescript(reqParams request.Params) (interface{}, *response.
tx := &transaction.Transaction{}
if len(reqParams) > 1 {
signers, _, err := reqParams[1].GetSignersWithWitnesses()
signers, witnesses, err := reqParams[1].GetSignersWithWitnesses()
if err != nil {
return nil, response.ErrInvalidParams
}
tx.Signers = signers
tx.Scripts = witnesses
}
if len(tx.Signers) == 0 {
tx.Signers = []transaction.Signer{{Account: util.Uint160{}, Scopes: transaction.None}}