From 9c34dea296ee532928f74096ff22c718c9b08745 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Mon, 15 Feb 2021 16:18:03 +0300 Subject: [PATCH] rpc/server: return more specific error in getblockhash --- pkg/rpc/server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rpc/server/server.go b/pkg/rpc/server/server.go index 68db88eb1..0864f4adb 100644 --- a/pkg/rpc/server/server.go +++ b/pkg/rpc/server/server.go @@ -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