github.com/Oyster-zx/tendermint@v0.34.24-fork/proto/tendermint/blockchain/types.pb.go (about)

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