From fda8b784c8a6d48527d562fc1723780f1554db9a Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Mon, 15 Feb 2021 17:27:23 +0300 Subject: [PATCH] rpc/server: allow numbers for getblockheader call --- pkg/rpc/server/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/rpc/server/server.go b/pkg/rpc/server/server.go index 0864f4adb..98739d4b7 100644 --- a/pkg/rpc/server/server.go +++ b/pkg/rpc/server/server.go @@ -1371,9 +1371,9 @@ func (s *Server) getBlockSysFee(reqParams request.Params) (interface{}, *respons // getBlockHeader returns the corresponding block header information according to the specified script hash. func (s *Server) getBlockHeader(reqParams request.Params) (interface{}, *response.Error) { - hash, err := reqParams.ValueWithType(0, request.StringT).GetUint256() - if err != nil { - return nil, response.ErrInvalidParams + hash, respErr := s.getBlockHashFromParam(reqParams.Value(0)) + if respErr != nil { + return nil, respErr } verbose := reqParams.Value(1).GetBoolean()