github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/proto/tendermint/blocksync/types.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: tendermint/blocksync/types.proto
     3  
     4  package blocksync
     5  
     6  import (
     7  	fmt "fmt"
     8  	types "github.com/ari-anchor/sei-tendermint/proto/tendermint/types"
     9  	proto "github.com/gogo/protobuf/proto"
    10  	io "io"
    11  	math "math"
    12  	math_bits "math/bits"
    13  )
    14  
    15  // Reference imports to suppress errors if they are not otherwise used.
    16  var _ = proto.Marshal
    17  var _ = fmt.Errorf
    18  var _ = math.Inf
    19  
    20  // This is a compile-time assertion to ensure that this generated file
    21  // is compatible with the proto package it is being compiled against.
    22  // A compilation error at this line likely means your copy of the
    23  // proto package needs to be updated.
    24  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    25  
    26  // BlockRequest requests a block for a specific height
    27  type BlockRequest struct {
    28  	Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
    29  }
    30  
    31  func (m *BlockRequest) Reset()         { *m = BlockRequest{} }
    32  func (m *BlockRequest) String() string { return proto.CompactTextString(m) }
    33  func (*BlockRequest) ProtoMessage()    {}
    34  func (*BlockRequest) Descriptor() ([]byte, []int) {
    35  	return fileDescriptor_19b397c236e0fa07, []int{0}
    36  }
    37  func (m *BlockRequest) XXX_Unmarshal(b []byte) error {
    38  	return m.Unmarshal(b)
    39  }
    40  func (m *BlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    41  	if deterministic {
    42  		return xxx_messageInfo_BlockRequest.Marshal(b, m, deterministic)
    43  	} else {
    44  		b = b[:cap(b)]
    45  		n, err := m.MarshalToSizedBuffer(b)
    46  		if err != nil {
    47  			return nil, err
    48  		}
    49  		return b[:n], nil
    50  	}
    51  }
    52  func (m *BlockRequest) XXX_Merge(src proto.Message) {
    53  	xxx_messageInfo_BlockRequest.Merge(m, src)
    54  }
    55  func (m *BlockRequest) XXX_Size() int {
    56  	return m.Size()
    57  }
    58  func (m *BlockRequest) XXX_DiscardUnknown() {
    59  	xxx_messageInfo_BlockRequest.DiscardUnknown(m)
    60  }
    61  
    62  var xxx_messageInfo_BlockRequest proto.InternalMessageInfo
    63  
    64  func (m *BlockRequest) GetHeight() int64 {
    65  	if m != nil {
    66  		return m.Height
    67  	}
    68  	return 0
    69  }
    70  
    71  // NoBlockResponse informs the node that the peer does not have block at the
    72  // requested height
    73  type NoBlockResponse struct {
    74  	Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
    75  }
    76  
    77  func (m *NoBlockResponse) Reset()         { *m = NoBlockResponse{} }
    78  func (m *NoBlockResponse) String() string { return proto.CompactTextString(m) }
    79  func (*NoBlockResponse) ProtoMessage()    {}
    80  func (*NoBlockResponse) Descriptor() ([]byte, []int) {
    81  	return fileDescriptor_19b397c236e0fa07, []int{1}
    82  }
    83  func (m *NoBlockResponse) XXX_Unmarshal(b []byte) error {
    84  	return m.Unmarshal(b)
    85  }
    86  func (m *NoBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    87  	if deterministic {
    88  		return xxx_messageInfo_NoBlockResponse.Marshal(b, m, deterministic)
    89  	} else {
    90  		b = b[:cap(b)]
    91  		n, err := m.MarshalToSizedBuffer(b)
    92  		if err != nil {
    93  			return nil, err
    94  		}
    95  		return b[:n], nil
    96  	}
    97  }
    98  func (m *NoBlockResponse) XXX_Merge(src proto.Message) {
    99  	xxx_messageInfo_NoBlockResponse.Merge(m, src)
   100  }
   101  func (m *NoBlockResponse) XXX_Size() int {
   102  	return m.Size()
   103  }
   104  func (m *NoBlockResponse) XXX_DiscardUnknown() {
   105  	xxx_messageInfo_NoBlockResponse.DiscardUnknown(m)
   106  }
   107  
   108  var xxx_messageInfo_NoBlockResponse proto.InternalMessageInfo
   109  
   110  func (m *NoBlockResponse) GetHeight() int64 {
   111  	if m != nil {
   112  		return m.Height
   113  	}
   114  	return 0
   115  }
   116  
   117  // BlockResponse returns block to the requested
   118  type BlockResponse struct {
   119  	Block     *types.Block          `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
   120  	ExtCommit *types.ExtendedCommit `protobuf:"bytes,2,opt,name=ext_commit,json=extCommit,proto3" json:"ext_commit,omitempty"`
   121  }
   122  
   123  func (m *BlockResponse) Reset()         { *m = BlockResponse{} }
   124  func (m *BlockResponse) String() string { return proto.CompactTextString(m) }
   125  func (*BlockResponse) ProtoMessage()    {}
   126  func (*BlockResponse) Descriptor() ([]byte, []int) {
   127  	return fileDescriptor_19b397c236e0fa07, []int{2}
   128  }
   129  func (m *BlockResponse) XXX_Unmarshal(b []byte) error {
   130  	return m.Unmarshal(b)
   131  }
   132  func (m *BlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   133  	if deterministic {
   134  		return xxx_messageInfo_BlockResponse.Marshal(b, m, deterministic)
   135  	} else {
   136  		b = b[:cap(b)]
   137  		n, err := m.MarshalToSizedBuffer(b)
   138  		if err != nil {
   139  			return nil, err
   140  		}
   141  		return b[:n], nil
   142  	}
   143  }
   144  func (m *BlockResponse) XXX_Merge(src proto.Message) {
   145  	xxx_messageInfo_BlockResponse.Merge(m, src)
   146  }
   147  func (m *BlockResponse) XXX_Size() int {
   148  	return m.Size()
   149  }
   150  func (m *BlockResponse) XXX_DiscardUnknown() {
   151  	xxx_messageInfo_BlockResponse.DiscardUnknown(m)
   152  }
   153  
   154  var xxx_messageInfo_BlockResponse proto.InternalMessageInfo
   155  
   156  func (m *BlockResponse) GetBlock() *types.Block {
   157  	if m != nil {
   158  		return m.Block
   159  	}
   160  	return nil
   161  }
   162  
   163  func (m *BlockResponse) GetExtCommit() *types.ExtendedCommit {
   164  	if m != nil {
   165  		return m.ExtCommit
   166  	}
   167  	return nil
   168  }
   169  
   170  // StatusRequest requests the status of a peer.
   171  type StatusRequest struct {
   172  }
   173  
   174  func (m *StatusRequest) Reset()         { *m = StatusRequest{} }
   175  func (m *StatusRequest) String() string { return proto.CompactTextString(m) }
   176  func (*StatusRequest) ProtoMessage()    {}
   177  func (*StatusRequest) Descriptor() ([]byte, []int) {
   178  	return fileDescriptor_19b397c236e0fa07, []int{3}
   179  }
   180  func (m *StatusRequest) XXX_Unmarshal(b []byte) error {
   181  	return m.Unmarshal(b)
   182  }
   183  func (m *StatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   184  	if deterministic {
   185  		return xxx_messageInfo_StatusRequest.Marshal(b, m, deterministic)
   186  	} else {
   187  		b = b[:cap(b)]
   188  		n, err := m.MarshalToSizedBuffer(b)
   189  		if err != nil {
   190  			return nil, err
   191  		}
   192  		return b[:n], nil
   193  	}
   194  }
   195  func (m *StatusRequest) XXX_Merge(src proto.Message) {
   196  	xxx_messageInfo_StatusRequest.Merge(m, src)
   197  }
   198  func (m *StatusRequest) XXX_Size() int {
   199  	return m.Size()
   200  }
   201  func (m *StatusRequest) XXX_DiscardUnknown() {
   202  	xxx_messageInfo_StatusRequest.DiscardUnknown(m)
   203  }
   204  
   205  var xxx_messageInfo_StatusRequest proto.InternalMessageInfo
   206  
   207  // StatusResponse is a peer response to inform their status.
   208  type StatusResponse struct {
   209  	Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
   210  	Base   int64 `protobuf:"varint,2,opt,name=base,proto3" json:"base,omitempty"`
   211  }
   212  
   213  func (m *StatusResponse) Reset()         { *m = StatusResponse{} }
   214  func (m *StatusResponse) String() string { return proto.CompactTextString(m) }
   215  func (*StatusResponse) ProtoMessage()    {}
   216  func (*StatusResponse) Descriptor() ([]byte, []int) {
   217  	return fileDescriptor_19b397c236e0fa07, []int{4}
   218  }
   219  func (m *StatusResponse) XXX_Unmarshal(b []byte) error {
   220  	return m.Unmarshal(b)
   221  }
   222  func (m *StatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   223  	if deterministic {
   224  		return xxx_messageInfo_StatusResponse.Marshal(b, m, deterministic)
   225  	} else {
   226  		b = b[:cap(b)]
   227  		n, err := m.MarshalToSizedBuffer(b)
   228  		if err != nil {
   229  			return nil, err
   230  		}
   231  		return b[:n], nil
   232  	}
   233  }
   234  func (m *StatusResponse) XXX_Merge(src proto.Message) {
   235  	xxx_messageInfo_StatusResponse.Merge(m, src)
   236  }
   237  func (m *StatusResponse) XXX_Size() int {
   238  	return m.Size()
   239  }
   240  func (m *StatusResponse) XXX_DiscardUnknown() {
   241  	xxx_messageInfo_StatusResponse.DiscardUnknown(m)
   242  }
   243  
   244  var xxx_messageInfo_StatusResponse proto.InternalMessageInfo
   245  
   246  func (m *StatusResponse) GetHeight() int64 {
   247  	if m != nil {
   248  		return m.Height
   249  	}
   250  	return 0
   251  }
   252  
   253  func (m *StatusResponse) GetBase() int64 {
   254  	if m != nil {
   255  		return m.Base
   256  	}
   257  	return 0
   258  }
   259  
   260  type Message struct {
   261  	// Types that are valid to be assigned to Sum:
   262  	//	*Message_BlockRequest
   263  	//	*Message_NoBlockResponse
   264  	//	*Message_BlockResponse
   265  	//	*Message_StatusRequest
   266  	//	*Message_StatusResponse
   267  	Sum isMessage_Sum `protobuf_oneof:"sum"`
   268  }
   269  
   270  func (m *Message) Reset()         { *m = Message{} }
   271  func (m *Message) String() string { return proto.CompactTextString(m) }
   272  func (*Message) ProtoMessage()    {}
   273  func (*Message) Descriptor() ([]byte, []int) {
   274  	return fileDescriptor_19b397c236e0fa07, []int{5}
   275  }
   276  func (m *Message) XXX_Unmarshal(b []byte) error {
   277  	return m.Unmarshal(b)
   278  }
   279  func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   280  	if deterministic {
   281  		return xxx_messageInfo_Message.Marshal(b, m, deterministic)
   282  	} else {
   283  		b = b[:cap(b)]
   284  		n, err := m.MarshalToSizedBuffer(b)
   285  		if err != nil {
   286  			return nil, err
   287  		}
   288  		return b[:n], nil
   289  	}
   290  }
   291  func (m *Message) XXX_Merge(src proto.Message) {
   292  	xxx_messageInfo_Message.Merge(m, src)
   293  }
   294  func (m *Message) XXX_Size() int {
   295  	return m.Size()
   296  }
   297  func (m *Message) XXX_DiscardUnknown() {
   298  	xxx_messageInfo_Message.DiscardUnknown(m)
   299  }
   300  
   301  var xxx_messageInfo_Message proto.InternalMessageInfo
   302  
   303  type isMessage_Sum interface {
   304  	isMessage_Sum()
   305  	MarshalTo([]byte) (int, error)
   306  	Size() int
   307  }
   308  
   309  type Message_BlockRequest struct {
   310  	BlockRequest *BlockRequest `protobuf:"bytes,1,opt,name=block_request,json=blockRequest,proto3,oneof" json:"block_request,omitempty"`
   311  }
   312  type Message_NoBlockResponse struct {
   313  	NoBlockResponse *NoBlockResponse `protobuf:"bytes,2,opt,name=no_block_response,json=noBlockResponse,proto3,oneof" json:"no_block_response,omitempty"`
   314  }
   315  type Message_BlockResponse struct {
   316  	BlockResponse *BlockResponse `protobuf:"bytes,3,opt,name=block_response,json=blockResponse,proto3,oneof" json:"block_response,omitempty"`
   317  }
   318  type Message_StatusRequest struct {
   319  	StatusRequest *StatusRequest `protobuf:"bytes,4,opt,name=status_request,json=statusRequest,proto3,oneof" json:"status_request,omitempty"`
   320  }
   321  type Message_StatusResponse struct {
   322  	StatusResponse *StatusResponse `protobuf:"bytes,5,opt,name=status_response,json=statusResponse,proto3,oneof" json:"status_response,omitempty"`
   323  }
   324  
   325  func (*Message_BlockRequest) isMessage_Sum()    {}
   326  func (*Message_NoBlockResponse) isMessage_Sum() {}
   327  func (*Message_BlockResponse) isMessage_Sum()   {}
   328  func (*Message_StatusRequest) isMessage_Sum()   {}
   329  func (*Message_StatusResponse) isMessage_Sum()  {}
   330  
   331  func (m *Message) GetSum() isMessage_Sum {
   332  	if m != nil {
   333  		return m.Sum
   334  	}
   335  	return nil
   336  }
   337  
   338  func (m *Message) GetBlockRequest() *BlockRequest {
   339  	if x, ok := m.GetSum().(*Message_BlockRequest); ok {
   340  		return x.BlockRequest
   341  	}
   342  	return nil
   343  }
   344  
   345  func (m *Message) GetNoBlockResponse() *NoBlockResponse {
   346  	if x, ok := m.GetSum().(*Message_NoBlockResponse); ok {
   347  		return x.NoBlockResponse
   348  	}
   349  	return nil
   350  }
   351  
   352  func (m *Message) GetBlockResponse() *BlockResponse {
   353  	if x, ok := m.GetSum().(*Message_BlockResponse); ok {
   354  		return x.BlockResponse
   355  	}
   356  	return nil
   357  }
   358  
   359  func (m *Message) GetStatusRequest() *StatusRequest {
   360  	if x, ok := m.GetSum().(*Message_StatusRequest); ok {
   361  		return x.StatusRequest
   362  	}
   363  	return nil
   364  }
   365  
   366  func (m *Message) GetStatusResponse() *StatusResponse {
   367  	if x, ok := m.GetSum().(*Message_StatusResponse); ok {
   368  		return x.StatusResponse
   369  	}
   370  	return nil
   371  }
   372  
   373  // XXX_OneofWrappers is for the internal use of the proto package.
   374  func (*Message) XXX_OneofWrappers() []interface{} {
   375  	return []interface{}{
   376  		(*Message_BlockRequest)(nil),
   377  		(*Message_NoBlockResponse)(nil),
   378  		(*Message_BlockResponse)(nil),
   379  		(*Message_StatusRequest)(nil),
   380  		(*Message_StatusResponse)(nil),
   381  	}
   382  }
   383  
   384  func init() {
   385  	proto.RegisterType((*BlockRequest)(nil), "seitendermint.blocksync.BlockRequest")
   386  	proto.RegisterType((*NoBlockResponse)(nil), "seitendermint.blocksync.NoBlockResponse")
   387  	proto.RegisterType((*BlockResponse)(nil), "seitendermint.blocksync.BlockResponse")
   388  	proto.RegisterType((*StatusRequest)(nil), "seitendermint.blocksync.StatusRequest")
   389  	proto.RegisterType((*StatusResponse)(nil), "seitendermint.blocksync.StatusResponse")
   390  	proto.RegisterType((*Message)(nil), "seitendermint.blocksync.Message")
   391  }
   392  
   393  func init() { proto.RegisterFile("tendermint/blocksync/types.proto", fileDescriptor_19b397c236e0fa07) }
   394  
   395  var fileDescriptor_19b397c236e0fa07 = []byte{
   396  	// 417 bytes of a gzipped FileDescriptorProto
   397  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xcf, 0x4a, 0xeb, 0x40,
   398  	0x14, 0xc6, 0x93, 0x9b, 0xb6, 0x97, 0x7b, 0x6e, 0xd3, 0x70, 0xb3, 0xb8, 0x96, 0x22, 0xa1, 0x44,
   399  	0xac, 0x75, 0xd1, 0x44, 0x74, 0x2b, 0x08, 0x11, 0xa1, 0x0b, 0xff, 0x40, 0x04, 0x41, 0x37, 0x25,
   400  	0x49, 0x87, 0x26, 0x68, 0x32, 0x35, 0x33, 0x81, 0xf6, 0x01, 0xdc, 0xfb, 0x20, 0x3e, 0x88, 0xcb,
   401  	0x2e, 0x5d, 0x4a, 0xfb, 0x22, 0xd2, 0x99, 0x34, 0x26, 0xa1, 0xb5, 0xbb, 0xc9, 0x99, 0xef, 0xfc,
   402  	0xf2, 0x7d, 0x73, 0x38, 0xd0, 0xa6, 0x28, 0x1a, 0xa2, 0x38, 0x0c, 0x22, 0x6a, 0xba, 0x4f, 0xd8,
   403  	0x7b, 0x24, 0xd3, 0xc8, 0x33, 0xe9, 0x74, 0x8c, 0x88, 0x31, 0x8e, 0x31, 0xc5, 0xea, 0x0e, 0x41,
   404  	0xc1, 0xb7, 0xc8, 0xc8, 0x44, 0xad, 0xdd, 0x5c, 0x2b, 0x6b, 0xe0, 0x00, 0xde, 0xb6, 0xe6, 0x36,
   405  	0x07, 0xd5, 0x3b, 0x50, 0xb7, 0x96, 0x62, 0x1b, 0x3d, 0x27, 0x88, 0x50, 0xf5, 0x3f, 0xd4, 0x7c,
   406  	0x14, 0x8c, 0x7c, 0xda, 0x14, 0xdb, 0x62, 0x57, 0xb2, 0xd3, 0x2f, 0xfd, 0x10, 0x94, 0x6b, 0x9c,
   407  	0x2a, 0xc9, 0x18, 0x47, 0x04, 0x6d, 0x94, 0xbe, 0x88, 0x20, 0x17, 0x95, 0x47, 0x50, 0x65, 0x8e,
   408  	0x98, 0xf0, 0xef, 0x71, 0xcb, 0x28, 0x26, 0xe1, 0x7e, 0x78, 0x0b, 0x17, 0xaa, 0x16, 0x00, 0x9a,
   409  	0xd0, 0x81, 0x87, 0xc3, 0x30, 0xa0, 0xcd, 0x5f, 0xac, 0x6d, 0x6f, 0x6d, 0xdb, 0xc5, 0x84, 0x95,
   410  	0x86, 0xe7, 0x4c, 0x6a, 0xff, 0x41, 0x13, 0xca, 0x8f, 0xba, 0x02, 0xf2, 0x2d, 0x75, 0x68, 0x42,
   411  	0xd2, 0x6c, 0xfa, 0x29, 0x34, 0x56, 0x85, 0x9f, 0x23, 0xa8, 0x2a, 0x54, 0x5c, 0x87, 0x20, 0xf6,
   412  	0x63, 0xc9, 0x66, 0x67, 0xfd, 0x4d, 0x82, 0xdf, 0x57, 0x88, 0x10, 0x67, 0x84, 0xd4, 0x4b, 0x90,
   413  	0x99, 0xcf, 0x41, 0xcc, 0xd1, 0x69, 0xb0, 0x7d, 0x63, 0xc3, 0x88, 0x8c, 0xfc, 0x1b, 0xf7, 0x05,
   414  	0xbb, 0xee, 0xe6, 0xdf, 0xfc, 0x0e, 0xfe, 0x45, 0x78, 0xb0, 0x02, 0x72, 0x6b, 0x69, 0xe6, 0xee,
   415  	0x46, 0x62, 0x69, 0x1a, 0x7d, 0xc1, 0x56, 0xa2, 0xd2, 0x80, 0x6e, 0xa0, 0x51, 0x82, 0x4a, 0x0c,
   416  	0xda, 0xd9, 0x66, 0x33, 0x43, 0xca, 0x6e, 0x19, 0x48, 0xd8, 0x03, 0x66, 0xb9, 0x2b, 0x5b, 0x80,
   417  	0x85, 0x01, 0x2c, 0x81, 0x24, 0x5f, 0x50, 0x6d, 0x50, 0x32, 0x60, 0x6a, 0xb1, 0xca, 0x88, 0x07,
   418  	0x5b, 0x89, 0x99, 0xc7, 0x06, 0x29, 0x54, 0xac, 0x2a, 0x48, 0x24, 0x09, 0xad, 0xfb, 0xf7, 0xb9,
   419  	0x26, 0xce, 0xe6, 0x9a, 0xf8, 0x39, 0xd7, 0xc4, 0xd7, 0x85, 0x26, 0xcc, 0x16, 0x9a, 0xf0, 0xb1,
   420  	0xd0, 0x84, 0x87, 0xb3, 0x51, 0x40, 0xfd, 0xc4, 0x35, 0x3c, 0x1c, 0x9a, 0x4e, 0x1c, 0xf4, 0x9c,
   421  	0xc8, 0xf3, 0x71, 0x6c, 0x12, 0x14, 0xf4, 0x72, 0xab, 0xc2, 0xd6, 0xc3, 0x5c, 0xb7, 0x94, 0x6e,
   422  	0x8d, 0xdd, 0x9d, 0x7c, 0x05, 0x00, 0x00, 0xff, 0xff, 0xf3, 0x1e, 0x6e, 0xb8, 0xb3, 0x03, 0x00,
   423  	0x00,
   424  }
   425  
   426  func (m *BlockRequest) Marshal() (dAtA []byte, err error) {
   427  	size := m.Size()
   428  	dAtA = make([]byte, size)
   429  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   430  	if err != nil {
   431  		return nil, err
   432  	}
   433  	return dAtA[:n], nil
   434  }
   435  
   436  func (m *BlockRequest) MarshalTo(dAtA []byte) (int, error) {
   437  	size := m.Size()
   438  	return m.MarshalToSizedBuffer(dAtA[:size])
   439  }
   440  
   441  func (m *BlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   442  	i := len(dAtA)
   443  	_ = i
   444  	var l int
   445  	_ = l
   446  	if m.Height != 0 {
   447  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
   448  		i--
   449  		dAtA[i] = 0x8
   450  	}
   451  	return len(dAtA) - i, nil
   452  }
   453  
   454  func (m *NoBlockResponse) Marshal() (dAtA []byte, err error) {
   455  	size := m.Size()
   456  	dAtA = make([]byte, size)
   457  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   458  	if err != nil {
   459  		return nil, err
   460  	}
   461  	return dAtA[:n], nil
   462  }
   463  
   464  func (m *NoBlockResponse) MarshalTo(dAtA []byte) (int, error) {
   465  	size := m.Size()
   466  	return m.MarshalToSizedBuffer(dAtA[:size])
   467  }
   468  
   469  func (m *NoBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   470  	i := len(dAtA)
   471  	_ = i
   472  	var l int
   473  	_ = l
   474  	if m.Height != 0 {
   475  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
   476  		i--
   477  		dAtA[i] = 0x8
   478  	}
   479  	return len(dAtA) - i, nil
   480  }
   481  
   482  func (m *BlockResponse) Marshal() (dAtA []byte, err error) {
   483  	size := m.Size()
   484  	dAtA = make([]byte, size)
   485  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   486  	if err != nil {
   487  		return nil, err
   488  	}
   489  	return dAtA[:n], nil
   490  }
   491  
   492  func (m *BlockResponse) MarshalTo(dAtA []byte) (int, error) {
   493  	size := m.Size()
   494  	return m.MarshalToSizedBuffer(dAtA[:size])
   495  }
   496  
   497  func (m *BlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   498  	i := len(dAtA)
   499  	_ = i
   500  	var l int
   501  	_ = l
   502  	if m.ExtCommit != nil {
   503  		{
   504  			size, err := m.ExtCommit.MarshalToSizedBuffer(dAtA[:i])
   505  			if err != nil {
   506  				return 0, err
   507  			}
   508  			i -= size
   509  			i = encodeVarintTypes(dAtA, i, uint64(size))
   510  		}
   511  		i--
   512  		dAtA[i] = 0x12
   513  	}
   514  	if m.Block != nil {
   515  		{
   516  			size, err := m.Block.MarshalToSizedBuffer(dAtA[:i])
   517  			if err != nil {
   518  				return 0, err
   519  			}
   520  			i -= size
   521  			i = encodeVarintTypes(dAtA, i, uint64(size))
   522  		}
   523  		i--
   524  		dAtA[i] = 0xa
   525  	}
   526  	return len(dAtA) - i, nil
   527  }
   528  
   529  func (m *StatusRequest) Marshal() (dAtA []byte, err error) {
   530  	size := m.Size()
   531  	dAtA = make([]byte, size)
   532  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   533  	if err != nil {
   534  		return nil, err
   535  	}
   536  	return dAtA[:n], nil
   537  }
   538  
   539  func (m *StatusRequest) MarshalTo(dAtA []byte) (int, error) {
   540  	size := m.Size()
   541  	return m.MarshalToSizedBuffer(dAtA[:size])
   542  }
   543  
   544  func (m *StatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   545  	i := len(dAtA)
   546  	_ = i
   547  	var l int
   548  	_ = l
   549  	return len(dAtA) - i, nil
   550  }
   551  
   552  func (m *StatusResponse) Marshal() (dAtA []byte, err error) {
   553  	size := m.Size()
   554  	dAtA = make([]byte, size)
   555  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   556  	if err != nil {
   557  		return nil, err
   558  	}
   559  	return dAtA[:n], nil
   560  }
   561  
   562  func (m *StatusResponse) MarshalTo(dAtA []byte) (int, error) {
   563  	size := m.Size()
   564  	return m.MarshalToSizedBuffer(dAtA[:size])
   565  }
   566  
   567  func (m *StatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   568  	i := len(dAtA)
   569  	_ = i
   570  	var l int
   571  	_ = l
   572  	if m.Base != 0 {
   573  		i = encodeVarintTypes(dAtA, i, uint64(m.Base))
   574  		i--
   575  		dAtA[i] = 0x10
   576  	}
   577  	if m.Height != 0 {
   578  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
   579  		i--
   580  		dAtA[i] = 0x8
   581  	}
   582  	return len(dAtA) - i, nil
   583  }
   584  
   585  func (m *Message) Marshal() (dAtA []byte, err error) {
   586  	size := m.Size()
   587  	dAtA = make([]byte, size)
   588  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   589  	if err != nil {
   590  		return nil, err
   591  	}
   592  	return dAtA[:n], nil
   593  }
   594  
   595  func (m *Message) MarshalTo(dAtA []byte) (int, error) {
   596  	size := m.Size()
   597  	return m.MarshalToSizedBuffer(dAtA[:size])
   598  }
   599  
   600  func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   601  	i := len(dAtA)
   602  	_ = i
   603  	var l int
   604  	_ = l
   605  	if m.Sum != nil {
   606  		{
   607  			size := m.Sum.Size()
   608  			i -= size
   609  			if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil {
   610  				return 0, err
   611  			}
   612  		}
   613  	}
   614  	return len(dAtA) - i, nil
   615  }
   616  
   617  func (m *Message_BlockRequest) MarshalTo(dAtA []byte) (int, error) {
   618  	size := m.Size()
   619  	return m.MarshalToSizedBuffer(dAtA[:size])
   620  }
   621  
   622  func (m *Message_BlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   623  	i := len(dAtA)
   624  	if m.BlockRequest != nil {
   625  		{
   626  			size, err := m.BlockRequest.MarshalToSizedBuffer(dAtA[:i])
   627  			if err != nil {
   628  				return 0, err
   629  			}
   630  			i -= size
   631  			i = encodeVarintTypes(dAtA, i, uint64(size))
   632  		}
   633  		i--
   634  		dAtA[i] = 0xa
   635  	}
   636  	return len(dAtA) - i, nil
   637  }
   638  func (m *Message_NoBlockResponse) MarshalTo(dAtA []byte) (int, error) {
   639  	size := m.Size()
   640  	return m.MarshalToSizedBuffer(dAtA[:size])
   641  }
   642  
   643  func (m *Message_NoBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   644  	i := len(dAtA)
   645  	if m.NoBlockResponse != nil {
   646  		{
   647  			size, err := m.NoBlockResponse.MarshalToSizedBuffer(dAtA[:i])
   648  			if err != nil {
   649  				return 0, err
   650  			}
   651  			i -= size
   652  			i = encodeVarintTypes(dAtA, i, uint64(size))
   653  		}
   654  		i--
   655  		dAtA[i] = 0x12
   656  	}
   657  	return len(dAtA) - i, nil
   658  }
   659  func (m *Message_BlockResponse) MarshalTo(dAtA []byte) (int, error) {
   660  	size := m.Size()
   661  	return m.MarshalToSizedBuffer(dAtA[:size])
   662  }
   663  
   664  func (m *Message_BlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   665  	i := len(dAtA)
   666  	if m.BlockResponse != nil {
   667  		{
   668  			size, err := m.BlockResponse.MarshalToSizedBuffer(dAtA[:i])
   669  			if err != nil {
   670  				return 0, err
   671  			}
   672  			i -= size
   673  			i = encodeVarintTypes(dAtA, i, uint64(size))
   674  		}
   675  		i--
   676  		dAtA[i] = 0x1a
   677  	}
   678  	return len(dAtA) - i, nil
   679  }
   680  func (m *Message_StatusRequest) MarshalTo(dAtA []byte) (int, error) {
   681  	size := m.Size()
   682  	return m.MarshalToSizedBuffer(dAtA[:size])
   683  }
   684  
   685  func (m *Message_StatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   686  	i := len(dAtA)
   687  	if m.StatusRequest != nil {
   688  		{
   689  			size, err := m.StatusRequest.MarshalToSizedBuffer(dAtA[:i])
   690  			if err != nil {
   691  				return 0, err
   692  			}
   693  			i -= size
   694  			i = encodeVarintTypes(dAtA, i, uint64(size))
   695  		}
   696  		i--
   697  		dAtA[i] = 0x22
   698  	}
   699  	return len(dAtA) - i, nil
   700  }
   701  func (m *Message_StatusResponse) MarshalTo(dAtA []byte) (int, error) {
   702  	size := m.Size()
   703  	return m.MarshalToSizedBuffer(dAtA[:size])
   704  }
   705  
   706  func (m *Message_StatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   707  	i := len(dAtA)
   708  	if m.StatusResponse != nil {
   709  		{
   710  			size, err := m.StatusResponse.MarshalToSizedBuffer(dAtA[:i])
   711  			if err != nil {
   712  				return 0, err
   713  			}
   714  			i -= size
   715  			i = encodeVarintTypes(dAtA, i, uint64(size))
   716  		}
   717  		i--
   718  		dAtA[i] = 0x2a
   719  	}
   720  	return len(dAtA) - i, nil
   721  }
   722  func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
   723  	offset -= sovTypes(v)
   724  	base := offset
   725  	for v >= 1<<7 {
   726  		dAtA[offset] = uint8(v&0x7f | 0x80)
   727  		v >>= 7
   728  		offset++
   729  	}
   730  	dAtA[offset] = uint8(v)
   731  	return base
   732  }
   733  func (m *BlockRequest) Size() (n int) {
   734  	if m == nil {
   735  		return 0
   736  	}
   737  	var l int
   738  	_ = l
   739  	if m.Height != 0 {
   740  		n += 1 + sovTypes(uint64(m.Height))
   741  	}
   742  	return n
   743  }
   744  
   745  func (m *NoBlockResponse) Size() (n int) {
   746  	if m == nil {
   747  		return 0
   748  	}
   749  	var l int
   750  	_ = l
   751  	if m.Height != 0 {
   752  		n += 1 + sovTypes(uint64(m.Height))
   753  	}
   754  	return n
   755  }
   756  
   757  func (m *BlockResponse) Size() (n int) {
   758  	if m == nil {
   759  		return 0
   760  	}
   761  	var l int
   762  	_ = l
   763  	if m.Block != nil {
   764  		l = m.Block.Size()
   765  		n += 1 + l + sovTypes(uint64(l))
   766  	}
   767  	if m.ExtCommit != nil {
   768  		l = m.ExtCommit.Size()
   769  		n += 1 + l + sovTypes(uint64(l))
   770  	}
   771  	return n
   772  }
   773  
   774  func (m *StatusRequest) Size() (n int) {
   775  	if m == nil {
   776  		return 0
   777  	}
   778  	var l int
   779  	_ = l
   780  	return n
   781  }
   782  
   783  func (m *StatusResponse) Size() (n int) {
   784  	if m == nil {
   785  		return 0
   786  	}
   787  	var l int
   788  	_ = l
   789  	if m.Height != 0 {
   790  		n += 1 + sovTypes(uint64(m.Height))
   791  	}
   792  	if m.Base != 0 {
   793  		n += 1 + sovTypes(uint64(m.Base))
   794  	}
   795  	return n
   796  }
   797  
   798  func (m *Message) Size() (n int) {
   799  	if m == nil {
   800  		return 0
   801  	}
   802  	var l int
   803  	_ = l
   804  	if m.Sum != nil {
   805  		n += m.Sum.Size()
   806  	}
   807  	return n
   808  }
   809  
   810  func (m *Message_BlockRequest) Size() (n int) {
   811  	if m == nil {
   812  		return 0
   813  	}
   814  	var l int
   815  	_ = l
   816  	if m.BlockRequest != nil {
   817  		l = m.BlockRequest.Size()
   818  		n += 1 + l + sovTypes(uint64(l))
   819  	}
   820  	return n
   821  }
   822  func (m *Message_NoBlockResponse) Size() (n int) {
   823  	if m == nil {
   824  		return 0
   825  	}
   826  	var l int
   827  	_ = l
   828  	if m.NoBlockResponse != nil {
   829  		l = m.NoBlockResponse.Size()
   830  		n += 1 + l + sovTypes(uint64(l))
   831  	}
   832  	return n
   833  }
   834  func (m *Message_BlockResponse) Size() (n int) {
   835  	if m == nil {
   836  		return 0
   837  	}
   838  	var l int
   839  	_ = l
   840  	if m.BlockResponse != nil {
   841  		l = m.BlockResponse.Size()
   842  		n += 1 + l + sovTypes(uint64(l))
   843  	}
   844  	return n
   845  }
   846  func (m *Message_StatusRequest) Size() (n int) {
   847  	if m == nil {
   848  		return 0
   849  	}
   850  	var l int
   851  	_ = l
   852  	if m.StatusRequest != nil {
   853  		l = m.StatusRequest.Size()
   854  		n += 1 + l + sovTypes(uint64(l))
   855  	}
   856  	return n
   857  }
   858  func (m *Message_StatusResponse) Size() (n int) {
   859  	if m == nil {
   860  		return 0
   861  	}
   862  	var l int
   863  	_ = l
   864  	if m.StatusResponse != nil {
   865  		l = m.StatusResponse.Size()
   866  		n += 1 + l + sovTypes(uint64(l))
   867  	}
   868  	return n
   869  }
   870  
   871  func sovTypes(x uint64) (n int) {
   872  	return (math_bits.Len64(x|1) + 6) / 7
   873  }
   874  func sozTypes(x uint64) (n int) {
   875  	return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   876  }
   877  func (m *BlockRequest) Unmarshal(dAtA []byte) error {
   878  	l := len(dAtA)
   879  	iNdEx := 0
   880  	for iNdEx < l {
   881  		preIndex := iNdEx
   882  		var wire uint64
   883  		for shift := uint(0); ; shift += 7 {
   884  			if shift >= 64 {
   885  				return ErrIntOverflowTypes
   886  			}
   887  			if iNdEx >= l {
   888  				return io.ErrUnexpectedEOF
   889  			}
   890  			b := dAtA[iNdEx]
   891  			iNdEx++
   892  			wire |= uint64(b&0x7F) << shift
   893  			if b < 0x80 {
   894  				break
   895  			}
   896  		}
   897  		fieldNum := int32(wire >> 3)
   898  		wireType := int(wire & 0x7)
   899  		if wireType == 4 {
   900  			return fmt.Errorf("proto: BlockRequest: wiretype end group for non-group")
   901  		}
   902  		if fieldNum <= 0 {
   903  			return fmt.Errorf("proto: BlockRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   904  		}
   905  		switch fieldNum {
   906  		case 1:
   907  			if wireType != 0 {
   908  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
   909  			}
   910  			m.Height = 0
   911  			for shift := uint(0); ; shift += 7 {
   912  				if shift >= 64 {
   913  					return ErrIntOverflowTypes
   914  				}
   915  				if iNdEx >= l {
   916  					return io.ErrUnexpectedEOF
   917  				}
   918  				b := dAtA[iNdEx]
   919  				iNdEx++
   920  				m.Height |= int64(b&0x7F) << shift
   921  				if b < 0x80 {
   922  					break
   923  				}
   924  			}
   925  		default:
   926  			iNdEx = preIndex
   927  			skippy, err := skipTypes(dAtA[iNdEx:])
   928  			if err != nil {
   929  				return err
   930  			}
   931  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   932  				return ErrInvalidLengthTypes
   933  			}
   934  			if (iNdEx + skippy) > l {
   935  				return io.ErrUnexpectedEOF
   936  			}
   937  			iNdEx += skippy
   938  		}
   939  	}
   940  
   941  	if iNdEx > l {
   942  		return io.ErrUnexpectedEOF
   943  	}
   944  	return nil
   945  }
   946  func (m *NoBlockResponse) Unmarshal(dAtA []byte) error {
   947  	l := len(dAtA)
   948  	iNdEx := 0
   949  	for iNdEx < l {
   950  		preIndex := iNdEx
   951  		var wire uint64
   952  		for shift := uint(0); ; shift += 7 {
   953  			if shift >= 64 {
   954  				return ErrIntOverflowTypes
   955  			}
   956  			if iNdEx >= l {
   957  				return io.ErrUnexpectedEOF
   958  			}
   959  			b := dAtA[iNdEx]
   960  			iNdEx++
   961  			wire |= uint64(b&0x7F) << shift
   962  			if b < 0x80 {
   963  				break
   964  			}
   965  		}
   966  		fieldNum := int32(wire >> 3)
   967  		wireType := int(wire & 0x7)
   968  		if wireType == 4 {
   969  			return fmt.Errorf("proto: NoBlockResponse: wiretype end group for non-group")
   970  		}
   971  		if fieldNum <= 0 {
   972  			return fmt.Errorf("proto: NoBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire)
   973  		}
   974  		switch fieldNum {
   975  		case 1:
   976  			if wireType != 0 {
   977  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
   978  			}
   979  			m.Height = 0
   980  			for shift := uint(0); ; shift += 7 {
   981  				if shift >= 64 {
   982  					return ErrIntOverflowTypes
   983  				}
   984  				if iNdEx >= l {
   985  					return io.ErrUnexpectedEOF
   986  				}
   987  				b := dAtA[iNdEx]
   988  				iNdEx++
   989  				m.Height |= int64(b&0x7F) << shift
   990  				if b < 0x80 {
   991  					break
   992  				}
   993  			}
   994  		default:
   995  			iNdEx = preIndex
   996  			skippy, err := skipTypes(dAtA[iNdEx:])
   997  			if err != nil {
   998  				return err
   999  			}
  1000  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1001  				return ErrInvalidLengthTypes
  1002  			}
  1003  			if (iNdEx + skippy) > l {
  1004  				return io.ErrUnexpectedEOF
  1005  			}
  1006  			iNdEx += skippy
  1007  		}
  1008  	}
  1009  
  1010  	if iNdEx > l {
  1011  		return io.ErrUnexpectedEOF
  1012  	}
  1013  	return nil
  1014  }
  1015  func (m *BlockResponse) Unmarshal(dAtA []byte) error {
  1016  	l := len(dAtA)
  1017  	iNdEx := 0
  1018  	for iNdEx < l {
  1019  		preIndex := iNdEx
  1020  		var wire uint64
  1021  		for shift := uint(0); ; shift += 7 {
  1022  			if shift >= 64 {
  1023  				return ErrIntOverflowTypes
  1024  			}
  1025  			if iNdEx >= l {
  1026  				return io.ErrUnexpectedEOF
  1027  			}
  1028  			b := dAtA[iNdEx]
  1029  			iNdEx++
  1030  			wire |= uint64(b&0x7F) << shift
  1031  			if b < 0x80 {
  1032  				break
  1033  			}
  1034  		}
  1035  		fieldNum := int32(wire >> 3)
  1036  		wireType := int(wire & 0x7)
  1037  		if wireType == 4 {
  1038  			return fmt.Errorf("proto: BlockResponse: wiretype end group for non-group")
  1039  		}
  1040  		if fieldNum <= 0 {
  1041  			return fmt.Errorf("proto: BlockResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1042  		}
  1043  		switch fieldNum {
  1044  		case 1:
  1045  			if wireType != 2 {
  1046  				return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType)
  1047  			}
  1048  			var msglen int
  1049  			for shift := uint(0); ; shift += 7 {
  1050  				if shift >= 64 {
  1051  					return ErrIntOverflowTypes
  1052  				}
  1053  				if iNdEx >= l {
  1054  					return io.ErrUnexpectedEOF
  1055  				}
  1056  				b := dAtA[iNdEx]
  1057  				iNdEx++
  1058  				msglen |= int(b&0x7F) << shift
  1059  				if b < 0x80 {
  1060  					break
  1061  				}
  1062  			}
  1063  			if msglen < 0 {
  1064  				return ErrInvalidLengthTypes
  1065  			}
  1066  			postIndex := iNdEx + msglen
  1067  			if postIndex < 0 {
  1068  				return ErrInvalidLengthTypes
  1069  			}
  1070  			if postIndex > l {
  1071  				return io.ErrUnexpectedEOF
  1072  			}
  1073  			if m.Block == nil {
  1074  				m.Block = &types.Block{}
  1075  			}
  1076  			if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1077  				return err
  1078  			}
  1079  			iNdEx = postIndex
  1080  		case 2:
  1081  			if wireType != 2 {
  1082  				return fmt.Errorf("proto: wrong wireType = %d for field ExtCommit", wireType)
  1083  			}
  1084  			var msglen int
  1085  			for shift := uint(0); ; shift += 7 {
  1086  				if shift >= 64 {
  1087  					return ErrIntOverflowTypes
  1088  				}
  1089  				if iNdEx >= l {
  1090  					return io.ErrUnexpectedEOF
  1091  				}
  1092  				b := dAtA[iNdEx]
  1093  				iNdEx++
  1094  				msglen |= int(b&0x7F) << shift
  1095  				if b < 0x80 {
  1096  					break
  1097  				}
  1098  			}
  1099  			if msglen < 0 {
  1100  				return ErrInvalidLengthTypes
  1101  			}
  1102  			postIndex := iNdEx + msglen
  1103  			if postIndex < 0 {
  1104  				return ErrInvalidLengthTypes
  1105  			}
  1106  			if postIndex > l {
  1107  				return io.ErrUnexpectedEOF
  1108  			}
  1109  			if m.ExtCommit == nil {
  1110  				m.ExtCommit = &types.ExtendedCommit{}
  1111  			}
  1112  			if err := m.ExtCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1113  				return err
  1114  			}
  1115  			iNdEx = postIndex
  1116  		default:
  1117  			iNdEx = preIndex
  1118  			skippy, err := skipTypes(dAtA[iNdEx:])
  1119  			if err != nil {
  1120  				return err
  1121  			}
  1122  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1123  				return ErrInvalidLengthTypes
  1124  			}
  1125  			if (iNdEx + skippy) > l {
  1126  				return io.ErrUnexpectedEOF
  1127  			}
  1128  			iNdEx += skippy
  1129  		}
  1130  	}
  1131  
  1132  	if iNdEx > l {
  1133  		return io.ErrUnexpectedEOF
  1134  	}
  1135  	return nil
  1136  }
  1137  func (m *StatusRequest) Unmarshal(dAtA []byte) error {
  1138  	l := len(dAtA)
  1139  	iNdEx := 0
  1140  	for iNdEx < l {
  1141  		preIndex := iNdEx
  1142  		var wire uint64
  1143  		for shift := uint(0); ; shift += 7 {
  1144  			if shift >= 64 {
  1145  				return ErrIntOverflowTypes
  1146  			}
  1147  			if iNdEx >= l {
  1148  				return io.ErrUnexpectedEOF
  1149  			}
  1150  			b := dAtA[iNdEx]
  1151  			iNdEx++
  1152  			wire |= uint64(b&0x7F) << shift
  1153  			if b < 0x80 {
  1154  				break
  1155  			}
  1156  		}
  1157  		fieldNum := int32(wire >> 3)
  1158  		wireType := int(wire & 0x7)
  1159  		if wireType == 4 {
  1160  			return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group")
  1161  		}
  1162  		if fieldNum <= 0 {
  1163  			return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1164  		}
  1165  		switch fieldNum {
  1166  		default:
  1167  			iNdEx = preIndex
  1168  			skippy, err := skipTypes(dAtA[iNdEx:])
  1169  			if err != nil {
  1170  				return err
  1171  			}
  1172  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1173  				return ErrInvalidLengthTypes
  1174  			}
  1175  			if (iNdEx + skippy) > l {
  1176  				return io.ErrUnexpectedEOF
  1177  			}
  1178  			iNdEx += skippy
  1179  		}
  1180  	}
  1181  
  1182  	if iNdEx > l {
  1183  		return io.ErrUnexpectedEOF
  1184  	}
  1185  	return nil
  1186  }
  1187  func (m *StatusResponse) Unmarshal(dAtA []byte) error {
  1188  	l := len(dAtA)
  1189  	iNdEx := 0
  1190  	for iNdEx < l {
  1191  		preIndex := iNdEx
  1192  		var wire uint64
  1193  		for shift := uint(0); ; shift += 7 {
  1194  			if shift >= 64 {
  1195  				return ErrIntOverflowTypes
  1196  			}
  1197  			if iNdEx >= l {
  1198  				return io.ErrUnexpectedEOF
  1199  			}
  1200  			b := dAtA[iNdEx]
  1201  			iNdEx++
  1202  			wire |= uint64(b&0x7F) << shift
  1203  			if b < 0x80 {
  1204  				break
  1205  			}
  1206  		}
  1207  		fieldNum := int32(wire >> 3)
  1208  		wireType := int(wire & 0x7)
  1209  		if wireType == 4 {
  1210  			return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group")
  1211  		}
  1212  		if fieldNum <= 0 {
  1213  			return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1214  		}
  1215  		switch fieldNum {
  1216  		case 1:
  1217  			if wireType != 0 {
  1218  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  1219  			}
  1220  			m.Height = 0
  1221  			for shift := uint(0); ; shift += 7 {
  1222  				if shift >= 64 {
  1223  					return ErrIntOverflowTypes
  1224  				}
  1225  				if iNdEx >= l {
  1226  					return io.ErrUnexpectedEOF
  1227  				}
  1228  				b := dAtA[iNdEx]
  1229  				iNdEx++
  1230  				m.Height |= int64(b&0x7F) << shift
  1231  				if b < 0x80 {
  1232  					break
  1233  				}
  1234  			}
  1235  		case 2:
  1236  			if wireType != 0 {
  1237  				return fmt.Errorf("proto: wrong wireType = %d for field Base", wireType)
  1238  			}
  1239  			m.Base = 0
  1240  			for shift := uint(0); ; shift += 7 {
  1241  				if shift >= 64 {
  1242  					return ErrIntOverflowTypes
  1243  				}
  1244  				if iNdEx >= l {
  1245  					return io.ErrUnexpectedEOF
  1246  				}
  1247  				b := dAtA[iNdEx]
  1248  				iNdEx++
  1249  				m.Base |= int64(b&0x7F) << shift
  1250  				if b < 0x80 {
  1251  					break
  1252  				}
  1253  			}
  1254  		default:
  1255  			iNdEx = preIndex
  1256  			skippy, err := skipTypes(dAtA[iNdEx:])
  1257  			if err != nil {
  1258  				return err
  1259  			}
  1260  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1261  				return ErrInvalidLengthTypes
  1262  			}
  1263  			if (iNdEx + skippy) > l {
  1264  				return io.ErrUnexpectedEOF
  1265  			}
  1266  			iNdEx += skippy
  1267  		}
  1268  	}
  1269  
  1270  	if iNdEx > l {
  1271  		return io.ErrUnexpectedEOF
  1272  	}
  1273  	return nil
  1274  }
  1275  func (m *Message) Unmarshal(dAtA []byte) error {
  1276  	l := len(dAtA)
  1277  	iNdEx := 0
  1278  	for iNdEx < l {
  1279  		preIndex := iNdEx
  1280  		var wire uint64
  1281  		for shift := uint(0); ; shift += 7 {
  1282  			if shift >= 64 {
  1283  				return ErrIntOverflowTypes
  1284  			}
  1285  			if iNdEx >= l {
  1286  				return io.ErrUnexpectedEOF
  1287  			}
  1288  			b := dAtA[iNdEx]
  1289  			iNdEx++
  1290  			wire |= uint64(b&0x7F) << shift
  1291  			if b < 0x80 {
  1292  				break
  1293  			}
  1294  		}
  1295  		fieldNum := int32(wire >> 3)
  1296  		wireType := int(wire & 0x7)
  1297  		if wireType == 4 {
  1298  			return fmt.Errorf("proto: Message: wiretype end group for non-group")
  1299  		}
  1300  		if fieldNum <= 0 {
  1301  			return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire)
  1302  		}
  1303  		switch fieldNum {
  1304  		case 1:
  1305  			if wireType != 2 {
  1306  				return fmt.Errorf("proto: wrong wireType = %d for field BlockRequest", wireType)
  1307  			}
  1308  			var msglen int
  1309  			for shift := uint(0); ; shift += 7 {
  1310  				if shift >= 64 {
  1311  					return ErrIntOverflowTypes
  1312  				}
  1313  				if iNdEx >= l {
  1314  					return io.ErrUnexpectedEOF
  1315  				}
  1316  				b := dAtA[iNdEx]
  1317  				iNdEx++
  1318  				msglen |= int(b&0x7F) << shift
  1319  				if b < 0x80 {
  1320  					break
  1321  				}
  1322  			}
  1323  			if msglen < 0 {
  1324  				return ErrInvalidLengthTypes
  1325  			}
  1326  			postIndex := iNdEx + msglen
  1327  			if postIndex < 0 {
  1328  				return ErrInvalidLengthTypes
  1329  			}
  1330  			if postIndex > l {
  1331  				return io.ErrUnexpectedEOF
  1332  			}
  1333  			v := &BlockRequest{}
  1334  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1335  				return err
  1336  			}
  1337  			m.Sum = &Message_BlockRequest{v}
  1338  			iNdEx = postIndex
  1339  		case 2:
  1340  			if wireType != 2 {
  1341  				return fmt.Errorf("proto: wrong wireType = %d for field NoBlockResponse", wireType)
  1342  			}
  1343  			var msglen int
  1344  			for shift := uint(0); ; shift += 7 {
  1345  				if shift >= 64 {
  1346  					return ErrIntOverflowTypes
  1347  				}
  1348  				if iNdEx >= l {
  1349  					return io.ErrUnexpectedEOF
  1350  				}
  1351  				b := dAtA[iNdEx]
  1352  				iNdEx++
  1353  				msglen |= int(b&0x7F) << shift
  1354  				if b < 0x80 {
  1355  					break
  1356  				}
  1357  			}
  1358  			if msglen < 0 {
  1359  				return ErrInvalidLengthTypes
  1360  			}
  1361  			postIndex := iNdEx + msglen
  1362  			if postIndex < 0 {
  1363  				return ErrInvalidLengthTypes
  1364  			}
  1365  			if postIndex > l {
  1366  				return io.ErrUnexpectedEOF
  1367  			}
  1368  			v := &NoBlockResponse{}
  1369  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1370  				return err
  1371  			}
  1372  			m.Sum = &Message_NoBlockResponse{v}
  1373  			iNdEx = postIndex
  1374  		case 3:
  1375  			if wireType != 2 {
  1376  				return fmt.Errorf("proto: wrong wireType = %d for field BlockResponse", wireType)
  1377  			}
  1378  			var msglen int
  1379  			for shift := uint(0); ; shift += 7 {
  1380  				if shift >= 64 {
  1381  					return ErrIntOverflowTypes
  1382  				}
  1383  				if iNdEx >= l {
  1384  					return io.ErrUnexpectedEOF
  1385  				}
  1386  				b := dAtA[iNdEx]
  1387  				iNdEx++
  1388  				msglen |= int(b&0x7F) << shift
  1389  				if b < 0x80 {
  1390  					break
  1391  				}
  1392  			}
  1393  			if msglen < 0 {
  1394  				return ErrInvalidLengthTypes
  1395  			}
  1396  			postIndex := iNdEx + msglen
  1397  			if postIndex < 0 {
  1398  				return ErrInvalidLengthTypes
  1399  			}
  1400  			if postIndex > l {
  1401  				return io.ErrUnexpectedEOF
  1402  			}
  1403  			v := &BlockResponse{}
  1404  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1405  				return err
  1406  			}
  1407  			m.Sum = &Message_BlockResponse{v}
  1408  			iNdEx = postIndex
  1409  		case 4:
  1410  			if wireType != 2 {
  1411  				return fmt.Errorf("proto: wrong wireType = %d for field StatusRequest", wireType)
  1412  			}
  1413  			var msglen int
  1414  			for shift := uint(0); ; shift += 7 {
  1415  				if shift >= 64 {
  1416  					return ErrIntOverflowTypes
  1417  				}
  1418  				if iNdEx >= l {
  1419  					return io.ErrUnexpectedEOF
  1420  				}
  1421  				b := dAtA[iNdEx]
  1422  				iNdEx++
  1423  				msglen |= int(b&0x7F) << shift
  1424  				if b < 0x80 {
  1425  					break
  1426  				}
  1427  			}
  1428  			if msglen < 0 {
  1429  				return ErrInvalidLengthTypes
  1430  			}
  1431  			postIndex := iNdEx + msglen
  1432  			if postIndex < 0 {
  1433  				return ErrInvalidLengthTypes
  1434  			}
  1435  			if postIndex > l {
  1436  				return io.ErrUnexpectedEOF
  1437  			}
  1438  			v := &StatusRequest{}
  1439  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1440  				return err
  1441  			}
  1442  			m.Sum = &Message_StatusRequest{v}
  1443  			iNdEx = postIndex
  1444  		case 5:
  1445  			if wireType != 2 {
  1446  				return fmt.Errorf("proto: wrong wireType = %d for field StatusResponse", wireType)
  1447  			}
  1448  			var msglen int
  1449  			for shift := uint(0); ; shift += 7 {
  1450  				if shift >= 64 {
  1451  					return ErrIntOverflowTypes
  1452  				}
  1453  				if iNdEx >= l {
  1454  					return io.ErrUnexpectedEOF
  1455  				}
  1456  				b := dAtA[iNdEx]
  1457  				iNdEx++
  1458  				msglen |= int(b&0x7F) << shift
  1459  				if b < 0x80 {
  1460  					break
  1461  				}
  1462  			}
  1463  			if msglen < 0 {
  1464  				return ErrInvalidLengthTypes
  1465  			}
  1466  			postIndex := iNdEx + msglen
  1467  			if postIndex < 0 {
  1468  				return ErrInvalidLengthTypes
  1469  			}
  1470  			if postIndex > l {
  1471  				return io.ErrUnexpectedEOF
  1472  			}
  1473  			v := &StatusResponse{}
  1474  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1475  				return err
  1476  			}
  1477  			m.Sum = &Message_StatusResponse{v}
  1478  			iNdEx = postIndex
  1479  		default:
  1480  			iNdEx = preIndex
  1481  			skippy, err := skipTypes(dAtA[iNdEx:])
  1482  			if err != nil {
  1483  				return err
  1484  			}
  1485  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1486  				return ErrInvalidLengthTypes
  1487  			}
  1488  			if (iNdEx + skippy) > l {
  1489  				return io.ErrUnexpectedEOF
  1490  			}
  1491  			iNdEx += skippy
  1492  		}
  1493  	}
  1494  
  1495  	if iNdEx > l {
  1496  		return io.ErrUnexpectedEOF
  1497  	}
  1498  	return nil
  1499  }
  1500  func skipTypes(dAtA []byte) (n int, err error) {
  1501  	l := len(dAtA)
  1502  	iNdEx := 0
  1503  	depth := 0
  1504  	for iNdEx < l {
  1505  		var wire uint64
  1506  		for shift := uint(0); ; shift += 7 {
  1507  			if shift >= 64 {
  1508  				return 0, ErrIntOverflowTypes
  1509  			}
  1510  			if iNdEx >= l {
  1511  				return 0, io.ErrUnexpectedEOF
  1512  			}
  1513  			b := dAtA[iNdEx]
  1514  			iNdEx++
  1515  			wire |= (uint64(b) & 0x7F) << shift
  1516  			if b < 0x80 {
  1517  				break
  1518  			}
  1519  		}
  1520  		wireType := int(wire & 0x7)
  1521  		switch wireType {
  1522  		case 0:
  1523  			for shift := uint(0); ; shift += 7 {
  1524  				if shift >= 64 {
  1525  					return 0, ErrIntOverflowTypes
  1526  				}
  1527  				if iNdEx >= l {
  1528  					return 0, io.ErrUnexpectedEOF
  1529  				}
  1530  				iNdEx++
  1531  				if dAtA[iNdEx-1] < 0x80 {
  1532  					break
  1533  				}
  1534  			}
  1535  		case 1:
  1536  			iNdEx += 8
  1537  		case 2:
  1538  			var length int
  1539  			for shift := uint(0); ; shift += 7 {
  1540  				if shift >= 64 {
  1541  					return 0, ErrIntOverflowTypes
  1542  				}
  1543  				if iNdEx >= l {
  1544  					return 0, io.ErrUnexpectedEOF
  1545  				}
  1546  				b := dAtA[iNdEx]
  1547  				iNdEx++
  1548  				length |= (int(b) & 0x7F) << shift
  1549  				if b < 0x80 {
  1550  					break
  1551  				}
  1552  			}
  1553  			if length < 0 {
  1554  				return 0, ErrInvalidLengthTypes
  1555  			}
  1556  			iNdEx += length
  1557  		case 3:
  1558  			depth++
  1559  		case 4:
  1560  			if depth == 0 {
  1561  				return 0, ErrUnexpectedEndOfGroupTypes
  1562  			}
  1563  			depth--
  1564  		case 5:
  1565  			iNdEx += 4
  1566  		default:
  1567  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1568  		}
  1569  		if iNdEx < 0 {
  1570  			return 0, ErrInvalidLengthTypes
  1571  		}
  1572  		if depth == 0 {
  1573  			return iNdEx, nil
  1574  		}
  1575  	}
  1576  	return 0, io.ErrUnexpectedEOF
  1577  }
  1578  
  1579  var (
  1580  	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
  1581  	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
  1582  	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  1583  )