rpc/server: allow numbers for getblockheader call

This commit is contained in:
Roman Khimov 2021-02-15 17:27:23 +03:00
parent 9c34dea296
commit fda8b784c8

View file

@ -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()