rpc/server: return more specific error in getblockhash

This commit is contained in:
Roman Khimov 2021-02-15 16:18:03 +03:00
parent c3b6405f0f
commit 9c34dea296

View file

@ -461,7 +461,7 @@ func (s *Server) getBlockHash(reqParams request.Params) (interface{}, *response.
}
num, err := s.blockHeightFromParam(param)
if err != nil {
return nil, response.ErrInvalidParams
return nil, err
}
return s.chain.GetHeaderHash(num), nil