github.com/Finschia/finschia-sdk@v0.48.1/types/tx2/service.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: lbm/tx/v1beta1/service.proto
     3  
     4  package tx2
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	query "github.com/Finschia/finschia-sdk/types/query"
    10  	tx "github.com/Finschia/finschia-sdk/types/tx"
    11  	types1 "github.com/Finschia/ostracon/proto/ostracon/types"
    12  	_ "github.com/gogo/protobuf/gogoproto"
    13  	grpc1 "github.com/gogo/protobuf/grpc"
    14  	proto "github.com/gogo/protobuf/proto"
    15  	golang_proto "github.com/golang/protobuf/proto"
    16  	types "github.com/tendermint/tendermint/proto/tendermint/types"
    17  	_ "google.golang.org/genproto/googleapis/api/annotations"
    18  	grpc "google.golang.org/grpc"
    19  	codes "google.golang.org/grpc/codes"
    20  	status "google.golang.org/grpc/status"
    21  	io "io"
    22  	math "math"
    23  	math_bits "math/bits"
    24  )
    25  
    26  // Reference imports to suppress errors if they are not otherwise used.
    27  var _ = proto.Marshal
    28  var _ = golang_proto.Marshal
    29  var _ = fmt.Errorf
    30  var _ = math.Inf
    31  
    32  // This is a compile-time assertion to ensure that this generated file
    33  // is compatible with the proto package it is being compiled against.
    34  // A compilation error at this line likely means your copy of the
    35  // proto package needs to be updated.
    36  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    37  
    38  // GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs
    39  // RPC method.
    40  //
    41  // Since: finschia-sdk 0.47.0
    42  type GetBlockWithTxsRequest struct {
    43  	// height is the height of the block to query.
    44  	Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
    45  	// pagination defines a pagination for the request.
    46  	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
    47  }
    48  
    49  func (m *GetBlockWithTxsRequest) Reset()         { *m = GetBlockWithTxsRequest{} }
    50  func (m *GetBlockWithTxsRequest) String() string { return proto.CompactTextString(m) }
    51  func (*GetBlockWithTxsRequest) ProtoMessage()    {}
    52  func (*GetBlockWithTxsRequest) Descriptor() ([]byte, []int) {
    53  	return fileDescriptor_6fc6bd78191bf1b3, []int{0}
    54  }
    55  func (m *GetBlockWithTxsRequest) XXX_Unmarshal(b []byte) error {
    56  	return m.Unmarshal(b)
    57  }
    58  func (m *GetBlockWithTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    59  	if deterministic {
    60  		return xxx_messageInfo_GetBlockWithTxsRequest.Marshal(b, m, deterministic)
    61  	} else {
    62  		b = b[:cap(b)]
    63  		n, err := m.MarshalToSizedBuffer(b)
    64  		if err != nil {
    65  			return nil, err
    66  		}
    67  		return b[:n], nil
    68  	}
    69  }
    70  func (m *GetBlockWithTxsRequest) XXX_Merge(src proto.Message) {
    71  	xxx_messageInfo_GetBlockWithTxsRequest.Merge(m, src)
    72  }
    73  func (m *GetBlockWithTxsRequest) XXX_Size() int {
    74  	return m.Size()
    75  }
    76  func (m *GetBlockWithTxsRequest) XXX_DiscardUnknown() {
    77  	xxx_messageInfo_GetBlockWithTxsRequest.DiscardUnknown(m)
    78  }
    79  
    80  var xxx_messageInfo_GetBlockWithTxsRequest proto.InternalMessageInfo
    81  
    82  func (m *GetBlockWithTxsRequest) GetHeight() int64 {
    83  	if m != nil {
    84  		return m.Height
    85  	}
    86  	return 0
    87  }
    88  
    89  func (m *GetBlockWithTxsRequest) GetPagination() *query.PageRequest {
    90  	if m != nil {
    91  		return m.Pagination
    92  	}
    93  	return nil
    94  }
    95  
    96  // GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method.
    97  //
    98  // Since: finschia-sdk 0.47.0
    99  type GetBlockWithTxsResponse struct {
   100  	// txs are the transactions in the block.
   101  	Txs     []*tx.Tx       `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
   102  	BlockId *types.BlockID `protobuf:"bytes,2,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"`
   103  	Block   *types1.Block  `protobuf:"bytes,3,opt,name=block,proto3" json:"block,omitempty"`
   104  	// pagination defines a pagination for the response.
   105  	Pagination *query.PageResponse `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"`
   106  }
   107  
   108  func (m *GetBlockWithTxsResponse) Reset()         { *m = GetBlockWithTxsResponse{} }
   109  func (m *GetBlockWithTxsResponse) String() string { return proto.CompactTextString(m) }
   110  func (*GetBlockWithTxsResponse) ProtoMessage()    {}
   111  func (*GetBlockWithTxsResponse) Descriptor() ([]byte, []int) {
   112  	return fileDescriptor_6fc6bd78191bf1b3, []int{1}
   113  }
   114  func (m *GetBlockWithTxsResponse) XXX_Unmarshal(b []byte) error {
   115  	return m.Unmarshal(b)
   116  }
   117  func (m *GetBlockWithTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   118  	if deterministic {
   119  		return xxx_messageInfo_GetBlockWithTxsResponse.Marshal(b, m, deterministic)
   120  	} else {
   121  		b = b[:cap(b)]
   122  		n, err := m.MarshalToSizedBuffer(b)
   123  		if err != nil {
   124  			return nil, err
   125  		}
   126  		return b[:n], nil
   127  	}
   128  }
   129  func (m *GetBlockWithTxsResponse) XXX_Merge(src proto.Message) {
   130  	xxx_messageInfo_GetBlockWithTxsResponse.Merge(m, src)
   131  }
   132  func (m *GetBlockWithTxsResponse) XXX_Size() int {
   133  	return m.Size()
   134  }
   135  func (m *GetBlockWithTxsResponse) XXX_DiscardUnknown() {
   136  	xxx_messageInfo_GetBlockWithTxsResponse.DiscardUnknown(m)
   137  }
   138  
   139  var xxx_messageInfo_GetBlockWithTxsResponse proto.InternalMessageInfo
   140  
   141  func (m *GetBlockWithTxsResponse) GetTxs() []*tx.Tx {
   142  	if m != nil {
   143  		return m.Txs
   144  	}
   145  	return nil
   146  }
   147  
   148  func (m *GetBlockWithTxsResponse) GetBlockId() *types.BlockID {
   149  	if m != nil {
   150  		return m.BlockId
   151  	}
   152  	return nil
   153  }
   154  
   155  func (m *GetBlockWithTxsResponse) GetBlock() *types1.Block {
   156  	if m != nil {
   157  		return m.Block
   158  	}
   159  	return nil
   160  }
   161  
   162  func (m *GetBlockWithTxsResponse) GetPagination() *query.PageResponse {
   163  	if m != nil {
   164  		return m.Pagination
   165  	}
   166  	return nil
   167  }
   168  
   169  func init() {
   170  	proto.RegisterType((*GetBlockWithTxsRequest)(nil), "lbm.tx.v1beta1.GetBlockWithTxsRequest")
   171  	golang_proto.RegisterType((*GetBlockWithTxsRequest)(nil), "lbm.tx.v1beta1.GetBlockWithTxsRequest")
   172  	proto.RegisterType((*GetBlockWithTxsResponse)(nil), "lbm.tx.v1beta1.GetBlockWithTxsResponse")
   173  	golang_proto.RegisterType((*GetBlockWithTxsResponse)(nil), "lbm.tx.v1beta1.GetBlockWithTxsResponse")
   174  }
   175  
   176  func init() { proto.RegisterFile("lbm/tx/v1beta1/service.proto", fileDescriptor_6fc6bd78191bf1b3) }
   177  func init() {
   178  	golang_proto.RegisterFile("lbm/tx/v1beta1/service.proto", fileDescriptor_6fc6bd78191bf1b3)
   179  }
   180  
   181  var fileDescriptor_6fc6bd78191bf1b3 = []byte{
   182  	// 470 bytes of a gzipped FileDescriptorProto
   183  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x41, 0x6b, 0x13, 0x41,
   184  	0x14, 0xce, 0x34, 0xda, 0xca, 0x14, 0x14, 0x06, 0x5b, 0x63, 0x08, 0x4b, 0x08, 0xd2, 0x84, 0x88,
   185  	0x33, 0x34, 0xfa, 0x0b, 0x8a, 0xb4, 0xf6, 0x26, 0x6b, 0x41, 0xf0, 0x22, 0xb3, 0x9b, 0x71, 0x77,
   186  	0x68, 0x76, 0x66, 0xbb, 0xf3, 0x52, 0xa6, 0x88, 0x17, 0x7f, 0x80, 0x08, 0xde, 0xfc, 0x35, 0x1e,
   187  	0x3d, 0x16, 0xbc, 0x78, 0x94, 0xc4, 0xb3, 0xbf, 0x41, 0x32, 0x33, 0x6b, 0xd2, 0xd6, 0xd2, 0x4b,
   188  	0x78, 0xd9, 0xef, 0x7b, 0xdf, 0x9b, 0xef, 0xbd, 0x0f, 0x77, 0x26, 0x49, 0xc1, 0xc0, 0xb2, 0xd3,
   189  	0xdd, 0x44, 0x00, 0xdf, 0x65, 0x46, 0x54, 0xa7, 0x32, 0x15, 0xb4, 0xac, 0x34, 0x68, 0x72, 0x77,
   190  	0x92, 0x14, 0x14, 0x2c, 0x0d, 0x68, 0xbb, 0x93, 0x69, 0x9d, 0x4d, 0x04, 0xe3, 0xa5, 0x64, 0x5c,
   191  	0x29, 0x0d, 0x1c, 0xa4, 0x56, 0xc6, 0xb3, 0xdb, 0xf7, 0x33, 0x9d, 0x69, 0x57, 0xb2, 0x45, 0x15,
   192  	0xbe, 0xb6, 0x53, 0x6d, 0x0a, 0x6d, 0x56, 0x87, 0x80, 0x0d, 0xd8, 0x30, 0x60, 0x09, 0x37, 0x82,
   193  	0x9d, 0x4c, 0x45, 0x75, 0xf6, 0x8f, 0x53, 0xf2, 0x4c, 0x2a, 0x27, 0x5f, 0xeb, 0x68, 0x03, 0x15,
   194  	0x4f, 0xb5, 0x62, 0x70, 0x56, 0x0a, 0xc3, 0x92, 0x89, 0x4e, 0x8f, 0xaf, 0xc1, 0xdc, 0x6f, 0xc0,
   195  	0x3a, 0x20, 0xd4, 0x58, 0x54, 0x85, 0x54, 0x70, 0x15, 0xed, 0x59, 0xbc, 0x7d, 0x20, 0x60, 0x6f,
   196  	0xa1, 0xf5, 0x5a, 0x42, 0x7e, 0x64, 0x4d, 0x2c, 0x4e, 0xa6, 0xc2, 0x00, 0xd9, 0xc6, 0xeb, 0xb9,
   197  	0x90, 0x59, 0x0e, 0x2d, 0xd4, 0x45, 0x83, 0x66, 0x1c, 0xfe, 0x91, 0x7d, 0x8c, 0x97, 0x6f, 0x6b,
   198  	0xad, 0x75, 0xd1, 0x60, 0x73, 0xb4, 0x43, 0xbd, 0x11, 0xba, 0x30, 0x42, 0x9d, 0x91, 0x7a, 0x67,
   199  	0xf4, 0x25, 0xcf, 0x44, 0xd0, 0x8c, 0x57, 0x3a, 0x7b, 0x7f, 0x10, 0x7e, 0x70, 0x65, 0xb4, 0x29,
   200  	0xb5, 0x32, 0x82, 0xf4, 0x71, 0x13, 0xac, 0x69, 0xa1, 0x6e, 0x73, 0xb0, 0x39, 0xda, 0xaa, 0xc5,
   201  	0x97, 0x87, 0xa0, 0x47, 0x36, 0x5e, 0x30, 0xc8, 0x33, 0x7c, 0xc7, 0xed, 0xe1, 0xad, 0x1c, 0x87,
   202  	0xa7, 0x3c, 0xa4, 0x4b, 0xbf, 0xd4, 0x3b, 0x75, 0x23, 0x0e, 0x9f, 0xc7, 0x1b, 0x8e, 0x7a, 0x38,
   203  	0x26, 0x8f, 0xf1, 0x6d, 0x57, 0xb6, 0x9a, 0xae, 0x65, 0x8b, 0xd6, 0xeb, 0x5b, 0x6d, 0x88, 0x3d,
   204  	0x87, 0x1c, 0x5c, 0xf0, 0x7b, 0xcb, 0x75, 0xf4, 0x6f, 0xf4, 0xeb, 0x8d, 0xac, 0x1a, 0x1e, 0x7d,
   205  	0x45, 0x78, 0xe3, 0x95, 0x8f, 0x17, 0xf9, 0x84, 0xf0, 0xbd, 0x4b, 0xe6, 0xc9, 0x0e, 0xbd, 0x98,
   206  	0x36, 0xfa, 0xff, 0xc3, 0xb4, 0xfb, 0x37, 0xf2, 0xfc, 0xf0, 0xde, 0xf0, 0xe3, 0x8f, 0xdf, 0x5f,
   207  	0xd6, 0x1e, 0x91, 0x1e, 0xbb, 0x14, 0x72, 0xb0, 0x21, 0x3e, 0xec, 0xbd, 0x3f, 0xea, 0x87, 0xbd,
   208  	0x17, 0xdf, 0x67, 0x11, 0x3a, 0x9f, 0x45, 0xe8, 0xd7, 0x2c, 0x42, 0x9f, 0xe7, 0x51, 0xe3, 0xdb,
   209  	0x3c, 0x42, 0xe7, 0xf3, 0xa8, 0xf1, 0x73, 0x1e, 0x35, 0xde, 0x0c, 0x33, 0x09, 0xf9, 0x34, 0xa1,
   210  	0xa9, 0x2e, 0xd8, 0xbe, 0x54, 0x26, 0xcd, 0x25, 0x67, 0xef, 0x42, 0xf1, 0xc4, 0x8c, 0x8f, 0xeb,
   211  	0x64, 0xd9, 0x51, 0xb2, 0xee, 0x82, 0xf5, 0xf4, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3b, 0xd2,
   212  	0xa0, 0xed, 0x5a, 0x03, 0x00, 0x00,
   213  }
   214  
   215  // Reference imports to suppress errors if they are not otherwise used.
   216  var _ context.Context
   217  var _ grpc.ClientConn
   218  
   219  // This is a compile-time assertion to ensure that this generated file
   220  // is compatible with the grpc package it is being compiled against.
   221  const _ = grpc.SupportPackageIsVersion4
   222  
   223  // ServiceClient is the client API for Service service.
   224  //
   225  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   226  type ServiceClient interface {
   227  	// GetBlockWithTxs fetches a block with decoded txs.
   228  	//
   229  	// Since: finschia-sdk 0.47.0
   230  	GetBlockWithTxs(ctx context.Context, in *GetBlockWithTxsRequest, opts ...grpc.CallOption) (*GetBlockWithTxsResponse, error)
   231  }
   232  
   233  type serviceClient struct {
   234  	cc grpc1.ClientConn
   235  }
   236  
   237  func NewServiceClient(cc grpc1.ClientConn) ServiceClient {
   238  	return &serviceClient{cc}
   239  }
   240  
   241  func (c *serviceClient) GetBlockWithTxs(ctx context.Context, in *GetBlockWithTxsRequest, opts ...grpc.CallOption) (*GetBlockWithTxsResponse, error) {
   242  	out := new(GetBlockWithTxsResponse)
   243  	err := c.cc.Invoke(ctx, "/lbm.tx.v1beta1.Service/GetBlockWithTxs", in, out, opts...)
   244  	if err != nil {
   245  		return nil, err
   246  	}
   247  	return out, nil
   248  }
   249  
   250  // ServiceServer is the server API for Service service.
   251  type ServiceServer interface {
   252  	// GetBlockWithTxs fetches a block with decoded txs.
   253  	//
   254  	// Since: finschia-sdk 0.47.0
   255  	GetBlockWithTxs(context.Context, *GetBlockWithTxsRequest) (*GetBlockWithTxsResponse, error)
   256  }
   257  
   258  // UnimplementedServiceServer can be embedded to have forward compatible implementations.
   259  type UnimplementedServiceServer struct {
   260  }
   261  
   262  func (*UnimplementedServiceServer) GetBlockWithTxs(ctx context.Context, req *GetBlockWithTxsRequest) (*GetBlockWithTxsResponse, error) {
   263  	return nil, status.Errorf(codes.Unimplemented, "method GetBlockWithTxs not implemented")
   264  }
   265  
   266  func RegisterServiceServer(s grpc1.Server, srv ServiceServer) {
   267  	s.RegisterService(&_Service_serviceDesc, srv)
   268  }
   269  
   270  func _Service_GetBlockWithTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   271  	in := new(GetBlockWithTxsRequest)
   272  	if err := dec(in); err != nil {
   273  		return nil, err
   274  	}
   275  	if interceptor == nil {
   276  		return srv.(ServiceServer).GetBlockWithTxs(ctx, in)
   277  	}
   278  	info := &grpc.UnaryServerInfo{
   279  		Server:     srv,
   280  		FullMethod: "/lbm.tx.v1beta1.Service/GetBlockWithTxs",
   281  	}
   282  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   283  		return srv.(ServiceServer).GetBlockWithTxs(ctx, req.(*GetBlockWithTxsRequest))
   284  	}
   285  	return interceptor(ctx, in, info, handler)
   286  }
   287  
   288  var _Service_serviceDesc = grpc.ServiceDesc{
   289  	ServiceName: "lbm.tx.v1beta1.Service",
   290  	HandlerType: (*ServiceServer)(nil),
   291  	Methods: []grpc.MethodDesc{
   292  		{
   293  			MethodName: "GetBlockWithTxs",
   294  			Handler:    _Service_GetBlockWithTxs_Handler,
   295  		},
   296  	},
   297  	Streams:  []grpc.StreamDesc{},
   298  	Metadata: "lbm/tx/v1beta1/service.proto",
   299  }
   300  
   301  func (m *GetBlockWithTxsRequest) Marshal() (dAtA []byte, err error) {
   302  	size := m.Size()
   303  	dAtA = make([]byte, size)
   304  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   305  	if err != nil {
   306  		return nil, err
   307  	}
   308  	return dAtA[:n], nil
   309  }
   310  
   311  func (m *GetBlockWithTxsRequest) MarshalTo(dAtA []byte) (int, error) {
   312  	size := m.Size()
   313  	return m.MarshalToSizedBuffer(dAtA[:size])
   314  }
   315  
   316  func (m *GetBlockWithTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   317  	i := len(dAtA)
   318  	_ = i
   319  	var l int
   320  	_ = l
   321  	if m.Pagination != nil {
   322  		{
   323  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
   324  			if err != nil {
   325  				return 0, err
   326  			}
   327  			i -= size
   328  			i = encodeVarintService(dAtA, i, uint64(size))
   329  		}
   330  		i--
   331  		dAtA[i] = 0x12
   332  	}
   333  	if m.Height != 0 {
   334  		i = encodeVarintService(dAtA, i, uint64(m.Height))
   335  		i--
   336  		dAtA[i] = 0x8
   337  	}
   338  	return len(dAtA) - i, nil
   339  }
   340  
   341  func (m *GetBlockWithTxsResponse) Marshal() (dAtA []byte, err error) {
   342  	size := m.Size()
   343  	dAtA = make([]byte, size)
   344  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   345  	if err != nil {
   346  		return nil, err
   347  	}
   348  	return dAtA[:n], nil
   349  }
   350  
   351  func (m *GetBlockWithTxsResponse) MarshalTo(dAtA []byte) (int, error) {
   352  	size := m.Size()
   353  	return m.MarshalToSizedBuffer(dAtA[:size])
   354  }
   355  
   356  func (m *GetBlockWithTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   357  	i := len(dAtA)
   358  	_ = i
   359  	var l int
   360  	_ = l
   361  	if m.Pagination != nil {
   362  		{
   363  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
   364  			if err != nil {
   365  				return 0, err
   366  			}
   367  			i -= size
   368  			i = encodeVarintService(dAtA, i, uint64(size))
   369  		}
   370  		i--
   371  		dAtA[i] = 0x22
   372  	}
   373  	if m.Block != nil {
   374  		{
   375  			size, err := m.Block.MarshalToSizedBuffer(dAtA[:i])
   376  			if err != nil {
   377  				return 0, err
   378  			}
   379  			i -= size
   380  			i = encodeVarintService(dAtA, i, uint64(size))
   381  		}
   382  		i--
   383  		dAtA[i] = 0x1a
   384  	}
   385  	if m.BlockId != nil {
   386  		{
   387  			size, err := m.BlockId.MarshalToSizedBuffer(dAtA[:i])
   388  			if err != nil {
   389  				return 0, err
   390  			}
   391  			i -= size
   392  			i = encodeVarintService(dAtA, i, uint64(size))
   393  		}
   394  		i--
   395  		dAtA[i] = 0x12
   396  	}
   397  	if len(m.Txs) > 0 {
   398  		for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- {
   399  			{
   400  				size, err := m.Txs[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   401  				if err != nil {
   402  					return 0, err
   403  				}
   404  				i -= size
   405  				i = encodeVarintService(dAtA, i, uint64(size))
   406  			}
   407  			i--
   408  			dAtA[i] = 0xa
   409  		}
   410  	}
   411  	return len(dAtA) - i, nil
   412  }
   413  
   414  func encodeVarintService(dAtA []byte, offset int, v uint64) int {
   415  	offset -= sovService(v)
   416  	base := offset
   417  	for v >= 1<<7 {
   418  		dAtA[offset] = uint8(v&0x7f | 0x80)
   419  		v >>= 7
   420  		offset++
   421  	}
   422  	dAtA[offset] = uint8(v)
   423  	return base
   424  }
   425  func (m *GetBlockWithTxsRequest) Size() (n int) {
   426  	if m == nil {
   427  		return 0
   428  	}
   429  	var l int
   430  	_ = l
   431  	if m.Height != 0 {
   432  		n += 1 + sovService(uint64(m.Height))
   433  	}
   434  	if m.Pagination != nil {
   435  		l = m.Pagination.Size()
   436  		n += 1 + l + sovService(uint64(l))
   437  	}
   438  	return n
   439  }
   440  
   441  func (m *GetBlockWithTxsResponse) Size() (n int) {
   442  	if m == nil {
   443  		return 0
   444  	}
   445  	var l int
   446  	_ = l
   447  	if len(m.Txs) > 0 {
   448  		for _, e := range m.Txs {
   449  			l = e.Size()
   450  			n += 1 + l + sovService(uint64(l))
   451  		}
   452  	}
   453  	if m.BlockId != nil {
   454  		l = m.BlockId.Size()
   455  		n += 1 + l + sovService(uint64(l))
   456  	}
   457  	if m.Block != nil {
   458  		l = m.Block.Size()
   459  		n += 1 + l + sovService(uint64(l))
   460  	}
   461  	if m.Pagination != nil {
   462  		l = m.Pagination.Size()
   463  		n += 1 + l + sovService(uint64(l))
   464  	}
   465  	return n
   466  }
   467  
   468  func sovService(x uint64) (n int) {
   469  	return (math_bits.Len64(x|1) + 6) / 7
   470  }
   471  func sozService(x uint64) (n int) {
   472  	return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   473  }
   474  func (m *GetBlockWithTxsRequest) Unmarshal(dAtA []byte) error {
   475  	l := len(dAtA)
   476  	iNdEx := 0
   477  	for iNdEx < l {
   478  		preIndex := iNdEx
   479  		var wire uint64
   480  		for shift := uint(0); ; shift += 7 {
   481  			if shift >= 64 {
   482  				return ErrIntOverflowService
   483  			}
   484  			if iNdEx >= l {
   485  				return io.ErrUnexpectedEOF
   486  			}
   487  			b := dAtA[iNdEx]
   488  			iNdEx++
   489  			wire |= uint64(b&0x7F) << shift
   490  			if b < 0x80 {
   491  				break
   492  			}
   493  		}
   494  		fieldNum := int32(wire >> 3)
   495  		wireType := int(wire & 0x7)
   496  		if wireType == 4 {
   497  			return fmt.Errorf("proto: GetBlockWithTxsRequest: wiretype end group for non-group")
   498  		}
   499  		if fieldNum <= 0 {
   500  			return fmt.Errorf("proto: GetBlockWithTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   501  		}
   502  		switch fieldNum {
   503  		case 1:
   504  			if wireType != 0 {
   505  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
   506  			}
   507  			m.Height = 0
   508  			for shift := uint(0); ; shift += 7 {
   509  				if shift >= 64 {
   510  					return ErrIntOverflowService
   511  				}
   512  				if iNdEx >= l {
   513  					return io.ErrUnexpectedEOF
   514  				}
   515  				b := dAtA[iNdEx]
   516  				iNdEx++
   517  				m.Height |= int64(b&0x7F) << shift
   518  				if b < 0x80 {
   519  					break
   520  				}
   521  			}
   522  		case 2:
   523  			if wireType != 2 {
   524  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
   525  			}
   526  			var msglen int
   527  			for shift := uint(0); ; shift += 7 {
   528  				if shift >= 64 {
   529  					return ErrIntOverflowService
   530  				}
   531  				if iNdEx >= l {
   532  					return io.ErrUnexpectedEOF
   533  				}
   534  				b := dAtA[iNdEx]
   535  				iNdEx++
   536  				msglen |= int(b&0x7F) << shift
   537  				if b < 0x80 {
   538  					break
   539  				}
   540  			}
   541  			if msglen < 0 {
   542  				return ErrInvalidLengthService
   543  			}
   544  			postIndex := iNdEx + msglen
   545  			if postIndex < 0 {
   546  				return ErrInvalidLengthService
   547  			}
   548  			if postIndex > l {
   549  				return io.ErrUnexpectedEOF
   550  			}
   551  			if m.Pagination == nil {
   552  				m.Pagination = &query.PageRequest{}
   553  			}
   554  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   555  				return err
   556  			}
   557  			iNdEx = postIndex
   558  		default:
   559  			iNdEx = preIndex
   560  			skippy, err := skipService(dAtA[iNdEx:])
   561  			if err != nil {
   562  				return err
   563  			}
   564  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   565  				return ErrInvalidLengthService
   566  			}
   567  			if (iNdEx + skippy) > l {
   568  				return io.ErrUnexpectedEOF
   569  			}
   570  			iNdEx += skippy
   571  		}
   572  	}
   573  
   574  	if iNdEx > l {
   575  		return io.ErrUnexpectedEOF
   576  	}
   577  	return nil
   578  }
   579  func (m *GetBlockWithTxsResponse) Unmarshal(dAtA []byte) error {
   580  	l := len(dAtA)
   581  	iNdEx := 0
   582  	for iNdEx < l {
   583  		preIndex := iNdEx
   584  		var wire uint64
   585  		for shift := uint(0); ; shift += 7 {
   586  			if shift >= 64 {
   587  				return ErrIntOverflowService
   588  			}
   589  			if iNdEx >= l {
   590  				return io.ErrUnexpectedEOF
   591  			}
   592  			b := dAtA[iNdEx]
   593  			iNdEx++
   594  			wire |= uint64(b&0x7F) << shift
   595  			if b < 0x80 {
   596  				break
   597  			}
   598  		}
   599  		fieldNum := int32(wire >> 3)
   600  		wireType := int(wire & 0x7)
   601  		if wireType == 4 {
   602  			return fmt.Errorf("proto: GetBlockWithTxsResponse: wiretype end group for non-group")
   603  		}
   604  		if fieldNum <= 0 {
   605  			return fmt.Errorf("proto: GetBlockWithTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
   606  		}
   607  		switch fieldNum {
   608  		case 1:
   609  			if wireType != 2 {
   610  				return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType)
   611  			}
   612  			var msglen int
   613  			for shift := uint(0); ; shift += 7 {
   614  				if shift >= 64 {
   615  					return ErrIntOverflowService
   616  				}
   617  				if iNdEx >= l {
   618  					return io.ErrUnexpectedEOF
   619  				}
   620  				b := dAtA[iNdEx]
   621  				iNdEx++
   622  				msglen |= int(b&0x7F) << shift
   623  				if b < 0x80 {
   624  					break
   625  				}
   626  			}
   627  			if msglen < 0 {
   628  				return ErrInvalidLengthService
   629  			}
   630  			postIndex := iNdEx + msglen
   631  			if postIndex < 0 {
   632  				return ErrInvalidLengthService
   633  			}
   634  			if postIndex > l {
   635  				return io.ErrUnexpectedEOF
   636  			}
   637  			m.Txs = append(m.Txs, &tx.Tx{})
   638  			if err := m.Txs[len(m.Txs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   639  				return err
   640  			}
   641  			iNdEx = postIndex
   642  		case 2:
   643  			if wireType != 2 {
   644  				return fmt.Errorf("proto: wrong wireType = %d for field BlockId", wireType)
   645  			}
   646  			var msglen int
   647  			for shift := uint(0); ; shift += 7 {
   648  				if shift >= 64 {
   649  					return ErrIntOverflowService
   650  				}
   651  				if iNdEx >= l {
   652  					return io.ErrUnexpectedEOF
   653  				}
   654  				b := dAtA[iNdEx]
   655  				iNdEx++
   656  				msglen |= int(b&0x7F) << shift
   657  				if b < 0x80 {
   658  					break
   659  				}
   660  			}
   661  			if msglen < 0 {
   662  				return ErrInvalidLengthService
   663  			}
   664  			postIndex := iNdEx + msglen
   665  			if postIndex < 0 {
   666  				return ErrInvalidLengthService
   667  			}
   668  			if postIndex > l {
   669  				return io.ErrUnexpectedEOF
   670  			}
   671  			if m.BlockId == nil {
   672  				m.BlockId = &types.BlockID{}
   673  			}
   674  			if err := m.BlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   675  				return err
   676  			}
   677  			iNdEx = postIndex
   678  		case 3:
   679  			if wireType != 2 {
   680  				return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType)
   681  			}
   682  			var msglen int
   683  			for shift := uint(0); ; shift += 7 {
   684  				if shift >= 64 {
   685  					return ErrIntOverflowService
   686  				}
   687  				if iNdEx >= l {
   688  					return io.ErrUnexpectedEOF
   689  				}
   690  				b := dAtA[iNdEx]
   691  				iNdEx++
   692  				msglen |= int(b&0x7F) << shift
   693  				if b < 0x80 {
   694  					break
   695  				}
   696  			}
   697  			if msglen < 0 {
   698  				return ErrInvalidLengthService
   699  			}
   700  			postIndex := iNdEx + msglen
   701  			if postIndex < 0 {
   702  				return ErrInvalidLengthService
   703  			}
   704  			if postIndex > l {
   705  				return io.ErrUnexpectedEOF
   706  			}
   707  			if m.Block == nil {
   708  				m.Block = &types1.Block{}
   709  			}
   710  			if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   711  				return err
   712  			}
   713  			iNdEx = postIndex
   714  		case 4:
   715  			if wireType != 2 {
   716  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
   717  			}
   718  			var msglen int
   719  			for shift := uint(0); ; shift += 7 {
   720  				if shift >= 64 {
   721  					return ErrIntOverflowService
   722  				}
   723  				if iNdEx >= l {
   724  					return io.ErrUnexpectedEOF
   725  				}
   726  				b := dAtA[iNdEx]
   727  				iNdEx++
   728  				msglen |= int(b&0x7F) << shift
   729  				if b < 0x80 {
   730  					break
   731  				}
   732  			}
   733  			if msglen < 0 {
   734  				return ErrInvalidLengthService
   735  			}
   736  			postIndex := iNdEx + msglen
   737  			if postIndex < 0 {
   738  				return ErrInvalidLengthService
   739  			}
   740  			if postIndex > l {
   741  				return io.ErrUnexpectedEOF
   742  			}
   743  			if m.Pagination == nil {
   744  				m.Pagination = &query.PageResponse{}
   745  			}
   746  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   747  				return err
   748  			}
   749  			iNdEx = postIndex
   750  		default:
   751  			iNdEx = preIndex
   752  			skippy, err := skipService(dAtA[iNdEx:])
   753  			if err != nil {
   754  				return err
   755  			}
   756  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   757  				return ErrInvalidLengthService
   758  			}
   759  			if (iNdEx + skippy) > l {
   760  				return io.ErrUnexpectedEOF
   761  			}
   762  			iNdEx += skippy
   763  		}
   764  	}
   765  
   766  	if iNdEx > l {
   767  		return io.ErrUnexpectedEOF
   768  	}
   769  	return nil
   770  }
   771  func skipService(dAtA []byte) (n int, err error) {
   772  	l := len(dAtA)
   773  	iNdEx := 0
   774  	depth := 0
   775  	for iNdEx < l {
   776  		var wire uint64
   777  		for shift := uint(0); ; shift += 7 {
   778  			if shift >= 64 {
   779  				return 0, ErrIntOverflowService
   780  			}
   781  			if iNdEx >= l {
   782  				return 0, io.ErrUnexpectedEOF
   783  			}
   784  			b := dAtA[iNdEx]
   785  			iNdEx++
   786  			wire |= (uint64(b) & 0x7F) << shift
   787  			if b < 0x80 {
   788  				break
   789  			}
   790  		}
   791  		wireType := int(wire & 0x7)
   792  		switch wireType {
   793  		case 0:
   794  			for shift := uint(0); ; shift += 7 {
   795  				if shift >= 64 {
   796  					return 0, ErrIntOverflowService
   797  				}
   798  				if iNdEx >= l {
   799  					return 0, io.ErrUnexpectedEOF
   800  				}
   801  				iNdEx++
   802  				if dAtA[iNdEx-1] < 0x80 {
   803  					break
   804  				}
   805  			}
   806  		case 1:
   807  			iNdEx += 8
   808  		case 2:
   809  			var length int
   810  			for shift := uint(0); ; shift += 7 {
   811  				if shift >= 64 {
   812  					return 0, ErrIntOverflowService
   813  				}
   814  				if iNdEx >= l {
   815  					return 0, io.ErrUnexpectedEOF
   816  				}
   817  				b := dAtA[iNdEx]
   818  				iNdEx++
   819  				length |= (int(b) & 0x7F) << shift
   820  				if b < 0x80 {
   821  					break
   822  				}
   823  			}
   824  			if length < 0 {
   825  				return 0, ErrInvalidLengthService
   826  			}
   827  			iNdEx += length
   828  		case 3:
   829  			depth++
   830  		case 4:
   831  			if depth == 0 {
   832  				return 0, ErrUnexpectedEndOfGroupService
   833  			}
   834  			depth--
   835  		case 5:
   836  			iNdEx += 4
   837  		default:
   838  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   839  		}
   840  		if iNdEx < 0 {
   841  			return 0, ErrInvalidLengthService
   842  		}
   843  		if depth == 0 {
   844  			return iNdEx, nil
   845  		}
   846  	}
   847  	return 0, io.ErrUnexpectedEOF
   848  }
   849  
   850  var (
   851  	ErrInvalidLengthService        = fmt.Errorf("proto: negative length found during unmarshaling")
   852  	ErrIntOverflowService          = fmt.Errorf("proto: integer overflow")
   853  	ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group")
   854  )