forked from TrueCloudLab/neoneo-go
rpc: fix getrawtransaction error returncode
Changed returncode of getrowtransaction method in case when transaction with specified hash does not exists. Now it returns error with code -100 instead of -32602 (as in c# node)
This commit is contained in:
parent
5dca765bd1
commit
f310145612
1 changed files with 1 additions and 1 deletions
|
@ -288,7 +288,7 @@ func (s *Server) getrawtransaction(reqParams Params) (interface{}, error) {
|
|||
resultsErr = errInvalidParams
|
||||
} else if tx, height, err := s.chain.GetTransaction(txHash); err != nil {
|
||||
err = errors.Wrapf(err, "Invalid transaction hash: %s", txHash)
|
||||
return nil, NewInvalidParamsError(err.Error(), err)
|
||||
return nil, NewRPCError("Unknown transaction", err.Error(), err)
|
||||
} else if len(reqParams) >= 2 {
|
||||
_header := s.chain.GetHeaderHash(int(height))
|
||||
header, err := s.chain.GetHeader(_header)
|
||||
|
|
Loading…
Reference in a new issue