Merge branch 'develop' into v1.5.4-candidate

This commit is contained in:
Jerry 2025-01-08 11:06:47 -08:00
commit f4788d3059
No known key found for this signature in database
GPG key ID: 5B33FA23CB103211

View file

@ -49,6 +49,10 @@ func (s *Server) HeaderByNumber(ctx context.Context, req *protobor.GetHeaderByNu
return nil, err
}
if header == nil {
return nil, errors.New("header not found")
}
return &protobor.GetHeaderByNumberResponse{Header: headerToProtoborHeader(header)}, nil
}
@ -62,6 +66,10 @@ func (s *Server) BlockByNumber(ctx context.Context, req *protobor.GetBlockByNumb
return nil, err
}
if block == nil {
return nil, errors.New("block not found")
}
return &protobor.GetBlockByNumberResponse{Block: blockToProtoBlock(block)}, nil
}