mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-13 05:45:02 +00:00
rpc/server: allow numbers for getblockheader call
This commit is contained in:
parent
9c34dea296
commit
fda8b784c8
1 changed files with 3 additions and 3 deletions
|
@ -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.
|
// getBlockHeader returns the corresponding block header information according to the specified script hash.
|
||||||
func (s *Server) getBlockHeader(reqParams request.Params) (interface{}, *response.Error) {
|
func (s *Server) getBlockHeader(reqParams request.Params) (interface{}, *response.Error) {
|
||||||
hash, err := reqParams.ValueWithType(0, request.StringT).GetUint256()
|
hash, respErr := s.getBlockHashFromParam(reqParams.Value(0))
|
||||||
if err != nil {
|
if respErr != nil {
|
||||||
return nil, response.ErrInvalidParams
|
return nil, respErr
|
||||||
}
|
}
|
||||||
|
|
||||||
verbose := reqParams.Value(1).GetBoolean()
|
verbose := reqParams.Value(1).GetBoolean()
|
||||||
|
|
Loading…
Reference in a new issue