github.com/adoriasoft/tendermint@v0.34.0-dev1.0.20200722151356-96d84601a75a/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  	types "github.com/adoriasoft/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_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  	// 376 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, 0xc2,
   391  	0x4a, 0x1b, 0xa5, 0x8b, 0x9d, 0xed, 0xc1, 0xb7, 0xf0, 0x19, 0x7c, 0x1a, 0x8f, 0x1c, 0x3d, 0x1a,
   392  	0x78, 0x11, 0xc3, 0x6e, 0x29, 0xa5, 0x81, 0x7a, 0xeb, 0x4e, 0xbf, 0xf9, 0xcd, 0xb7, 0x5f, 0x66,
   393  	0xe1, 0x98, 0x91, 0x70, 0x48, 0xa2, 0x71, 0x10, 0x32, 0xdb, 0x7b, 0xa5, 0x83, 0x97, 0x81, 0xef,
   394  	0x06, 0xa1, 0xcd, 0xde, 0x27, 0x04, 0xad, 0x49, 0x44, 0x19, 0xd5, 0x77, 0x57, 0x12, 0x6b, 0x25,
   395  	0x39, 0x38, 0xcc, 0x74, 0x72, 0xb9, 0xe8, 0x17, 0x4d, 0x66, 0x13, 0x6a, 0x9d, 0xc5, 0xd1, 0x21,
   396  	0x6f, 0x31, 0x41, 0xa6, 0xef, 0x41, 0xc5, 0x27, 0xc1, 0xc8, 0x67, 0x0d, 0xf9, 0x48, 0x3e, 0x57,
   397  	0x9c, 0xe4, 0x64, 0x5e, 0x80, 0x76, 0x4b, 0x13, 0x25, 0x4e, 0x68, 0x88, 0x64, 0xab, 0xf4, 0x1a,
   398  	0xd4, 0x75, 0xe1, 0x25, 0x94, 0xf9, 0x48, 0xae, 0xab, 0xb6, 0xf6, 0xad, 0x8c, 0x51, 0x71, 0x01,
   399  	0xa1, 0x17, 0x2a, 0x53, 0x03, 0xf5, 0x9e, 0xb9, 0x2c, 0xc6, 0xc4, 0x93, 0xd9, 0x86, 0xfa, 0xb2,
   400  	0x50, 0x3c, 0x5a, 0xd7, 0xa1, 0xe4, 0xb9, 0x48, 0x1a, 0xff, 0x78, 0x95, 0x7f, 0x9b, 0x9f, 0x0a,
   401  	0xfc, 0xef, 0x11, 0x44, 0x77, 0x44, 0xf4, 0x1b, 0x50, 0xf9, 0x8c, 0x7e, 0x24, 0xd0, 0x89, 0xa3,
   402  	0x13, 0x6b, 0x63, 0x74, 0x56, 0x36, 0x99, 0xae, 0xe4, 0xd4, 0xbc, 0x6c, 0x52, 0x0f, 0xb0, 0x13,
   403  	0xd2, 0xfe, 0x12, 0x27, 0x8c, 0xf1, 0xc1, 0xd5, 0x56, 0x73, 0x0b, 0x2f, 0x97, 0x60, 0x57, 0x72,
   404  	0xb4, 0x30, 0x17, 0x6a, 0x0f, 0xea, 0x39, 0xa4, 0xc2, 0x91, 0xa7, 0xc5, 0x16, 0x53, 0xa0, 0xea,
   405  	0xe5, 0x71, 0xc8, 0xa3, 0x4b, 0x6f, 0x5c, 0x2a, 0xc4, 0xad, 0x05, 0xbf, 0xc0, 0x61, 0xb6, 0xa0,
   406  	0xdf, 0x81, 0x96, 0xe2, 0x12, 0x7b, 0x65, 0xce, 0x3b, 0xfb, 0x83, 0x97, 0xfa, 0xab, 0xe3, 0x5a,
   407  	0xa5, 0x53, 0x06, 0x05, 0xe3, 0x71, 0xe7, 0xf1, 0x6b, 0x66, 0xc8, 0xd3, 0x99, 0x21, 0xff, 0xcc,
   408  	0x0c, 0xf9, 0x63, 0x6e, 0x48, 0xd3, 0xb9, 0x21, 0x7d, 0xcf, 0x0d, 0xe9, 0xa9, 0x3d, 0x0a, 0x98,
   409  	0x1f, 0x7b, 0xd6, 0x80, 0x8e, 0x6d, 0x77, 0x48, 0xa3, 0xc0, 0x45, 0xfa, 0xcc, 0xec, 0xcc, 0x52,
   410  	0xf3, 0x45, 0xb6, 0x37, 0xbe, 0x0f, 0xaf, 0xc2, 0x7f, 0x5e, 0xfd, 0x06, 0x00, 0x00, 0xff, 0xff,
   411  	0xc0, 0x2a, 0xd0, 0x6a, 0x3f, 0x03, 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 {
   904  				return ErrInvalidLengthTypes
   905  			}
   906  			if (iNdEx + skippy) < 0 {
   907  				return ErrInvalidLengthTypes
   908  			}
   909  			if (iNdEx + skippy) > l {
   910  				return io.ErrUnexpectedEOF
   911  			}
   912  			iNdEx += skippy
   913  		}
   914  	}
   915  
   916  	if iNdEx > l {
   917  		return io.ErrUnexpectedEOF
   918  	}
   919  	return nil
   920  }
   921  func (m *NoBlockResponse) Unmarshal(dAtA []byte) error {
   922  	l := len(dAtA)
   923  	iNdEx := 0
   924  	for iNdEx < l {
   925  		preIndex := iNdEx
   926  		var wire uint64
   927  		for shift := uint(0); ; shift += 7 {
   928  			if shift >= 64 {
   929  				return ErrIntOverflowTypes
   930  			}
   931  			if iNdEx >= l {
   932  				return io.ErrUnexpectedEOF
   933  			}
   934  			b := dAtA[iNdEx]
   935  			iNdEx++
   936  			wire |= uint64(b&0x7F) << shift
   937  			if b < 0x80 {
   938  				break
   939  			}
   940  		}
   941  		fieldNum := int32(wire >> 3)
   942  		wireType := int(wire & 0x7)
   943  		if wireType == 4 {
   944  			return fmt.Errorf("proto: NoBlockResponse: wiretype end group for non-group")
   945  		}
   946  		if fieldNum <= 0 {
   947  			return fmt.Errorf("proto: NoBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire)
   948  		}
   949  		switch fieldNum {
   950  		case 1:
   951  			if wireType != 0 {
   952  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
   953  			}
   954  			m.Height = 0
   955  			for shift := uint(0); ; shift += 7 {
   956  				if shift >= 64 {
   957  					return ErrIntOverflowTypes
   958  				}
   959  				if iNdEx >= l {
   960  					return io.ErrUnexpectedEOF
   961  				}
   962  				b := dAtA[iNdEx]
   963  				iNdEx++
   964  				m.Height |= int64(b&0x7F) << shift
   965  				if b < 0x80 {
   966  					break
   967  				}
   968  			}
   969  		default:
   970  			iNdEx = preIndex
   971  			skippy, err := skipTypes(dAtA[iNdEx:])
   972  			if err != nil {
   973  				return err
   974  			}
   975  			if skippy < 0 {
   976  				return ErrInvalidLengthTypes
   977  			}
   978  			if (iNdEx + skippy) < 0 {
   979  				return ErrInvalidLengthTypes
   980  			}
   981  			if (iNdEx + skippy) > l {
   982  				return io.ErrUnexpectedEOF
   983  			}
   984  			iNdEx += skippy
   985  		}
   986  	}
   987  
   988  	if iNdEx > l {
   989  		return io.ErrUnexpectedEOF
   990  	}
   991  	return nil
   992  }
   993  func (m *BlockResponse) Unmarshal(dAtA []byte) error {
   994  	l := len(dAtA)
   995  	iNdEx := 0
   996  	for iNdEx < l {
   997  		preIndex := iNdEx
   998  		var wire uint64
   999  		for shift := uint(0); ; shift += 7 {
  1000  			if shift >= 64 {
  1001  				return ErrIntOverflowTypes
  1002  			}
  1003  			if iNdEx >= l {
  1004  				return io.ErrUnexpectedEOF
  1005  			}
  1006  			b := dAtA[iNdEx]
  1007  			iNdEx++
  1008  			wire |= uint64(b&0x7F) << shift
  1009  			if b < 0x80 {
  1010  				break
  1011  			}
  1012  		}
  1013  		fieldNum := int32(wire >> 3)
  1014  		wireType := int(wire & 0x7)
  1015  		if wireType == 4 {
  1016  			return fmt.Errorf("proto: BlockResponse: wiretype end group for non-group")
  1017  		}
  1018  		if fieldNum <= 0 {
  1019  			return fmt.Errorf("proto: BlockResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1020  		}
  1021  		switch fieldNum {
  1022  		case 1:
  1023  			if wireType != 2 {
  1024  				return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType)
  1025  			}
  1026  			var msglen int
  1027  			for shift := uint(0); ; shift += 7 {
  1028  				if shift >= 64 {
  1029  					return ErrIntOverflowTypes
  1030  				}
  1031  				if iNdEx >= l {
  1032  					return io.ErrUnexpectedEOF
  1033  				}
  1034  				b := dAtA[iNdEx]
  1035  				iNdEx++
  1036  				msglen |= int(b&0x7F) << shift
  1037  				if b < 0x80 {
  1038  					break
  1039  				}
  1040  			}
  1041  			if msglen < 0 {
  1042  				return ErrInvalidLengthTypes
  1043  			}
  1044  			postIndex := iNdEx + msglen
  1045  			if postIndex < 0 {
  1046  				return ErrInvalidLengthTypes
  1047  			}
  1048  			if postIndex > l {
  1049  				return io.ErrUnexpectedEOF
  1050  			}
  1051  			if m.Block == nil {
  1052  				m.Block = &types.Block{}
  1053  			}
  1054  			if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1055  				return err
  1056  			}
  1057  			iNdEx = postIndex
  1058  		default:
  1059  			iNdEx = preIndex
  1060  			skippy, err := skipTypes(dAtA[iNdEx:])
  1061  			if err != nil {
  1062  				return err
  1063  			}
  1064  			if skippy < 0 {
  1065  				return ErrInvalidLengthTypes
  1066  			}
  1067  			if (iNdEx + skippy) < 0 {
  1068  				return ErrInvalidLengthTypes
  1069  			}
  1070  			if (iNdEx + skippy) > l {
  1071  				return io.ErrUnexpectedEOF
  1072  			}
  1073  			iNdEx += skippy
  1074  		}
  1075  	}
  1076  
  1077  	if iNdEx > l {
  1078  		return io.ErrUnexpectedEOF
  1079  	}
  1080  	return nil
  1081  }
  1082  func (m *StatusRequest) Unmarshal(dAtA []byte) error {
  1083  	l := len(dAtA)
  1084  	iNdEx := 0
  1085  	for iNdEx < l {
  1086  		preIndex := iNdEx
  1087  		var wire uint64
  1088  		for shift := uint(0); ; shift += 7 {
  1089  			if shift >= 64 {
  1090  				return ErrIntOverflowTypes
  1091  			}
  1092  			if iNdEx >= l {
  1093  				return io.ErrUnexpectedEOF
  1094  			}
  1095  			b := dAtA[iNdEx]
  1096  			iNdEx++
  1097  			wire |= uint64(b&0x7F) << shift
  1098  			if b < 0x80 {
  1099  				break
  1100  			}
  1101  		}
  1102  		fieldNum := int32(wire >> 3)
  1103  		wireType := int(wire & 0x7)
  1104  		if wireType == 4 {
  1105  			return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group")
  1106  		}
  1107  		if fieldNum <= 0 {
  1108  			return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1109  		}
  1110  		switch fieldNum {
  1111  		default:
  1112  			iNdEx = preIndex
  1113  			skippy, err := skipTypes(dAtA[iNdEx:])
  1114  			if err != nil {
  1115  				return err
  1116  			}
  1117  			if skippy < 0 {
  1118  				return ErrInvalidLengthTypes
  1119  			}
  1120  			if (iNdEx + skippy) < 0 {
  1121  				return ErrInvalidLengthTypes
  1122  			}
  1123  			if (iNdEx + skippy) > l {
  1124  				return io.ErrUnexpectedEOF
  1125  			}
  1126  			iNdEx += skippy
  1127  		}
  1128  	}
  1129  
  1130  	if iNdEx > l {
  1131  		return io.ErrUnexpectedEOF
  1132  	}
  1133  	return nil
  1134  }
  1135  func (m *StatusResponse) Unmarshal(dAtA []byte) error {
  1136  	l := len(dAtA)
  1137  	iNdEx := 0
  1138  	for iNdEx < l {
  1139  		preIndex := iNdEx
  1140  		var wire uint64
  1141  		for shift := uint(0); ; shift += 7 {
  1142  			if shift >= 64 {
  1143  				return ErrIntOverflowTypes
  1144  			}
  1145  			if iNdEx >= l {
  1146  				return io.ErrUnexpectedEOF
  1147  			}
  1148  			b := dAtA[iNdEx]
  1149  			iNdEx++
  1150  			wire |= uint64(b&0x7F) << shift
  1151  			if b < 0x80 {
  1152  				break
  1153  			}
  1154  		}
  1155  		fieldNum := int32(wire >> 3)
  1156  		wireType := int(wire & 0x7)
  1157  		if wireType == 4 {
  1158  			return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group")
  1159  		}
  1160  		if fieldNum <= 0 {
  1161  			return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1162  		}
  1163  		switch fieldNum {
  1164  		case 1:
  1165  			if wireType != 0 {
  1166  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  1167  			}
  1168  			m.Height = 0
  1169  			for shift := uint(0); ; shift += 7 {
  1170  				if shift >= 64 {
  1171  					return ErrIntOverflowTypes
  1172  				}
  1173  				if iNdEx >= l {
  1174  					return io.ErrUnexpectedEOF
  1175  				}
  1176  				b := dAtA[iNdEx]
  1177  				iNdEx++
  1178  				m.Height |= int64(b&0x7F) << shift
  1179  				if b < 0x80 {
  1180  					break
  1181  				}
  1182  			}
  1183  		case 2:
  1184  			if wireType != 0 {
  1185  				return fmt.Errorf("proto: wrong wireType = %d for field Base", wireType)
  1186  			}
  1187  			m.Base = 0
  1188  			for shift := uint(0); ; shift += 7 {
  1189  				if shift >= 64 {
  1190  					return ErrIntOverflowTypes
  1191  				}
  1192  				if iNdEx >= l {
  1193  					return io.ErrUnexpectedEOF
  1194  				}
  1195  				b := dAtA[iNdEx]
  1196  				iNdEx++
  1197  				m.Base |= int64(b&0x7F) << shift
  1198  				if b < 0x80 {
  1199  					break
  1200  				}
  1201  			}
  1202  		default:
  1203  			iNdEx = preIndex
  1204  			skippy, err := skipTypes(dAtA[iNdEx:])
  1205  			if err != nil {
  1206  				return err
  1207  			}
  1208  			if skippy < 0 {
  1209  				return ErrInvalidLengthTypes
  1210  			}
  1211  			if (iNdEx + skippy) < 0 {
  1212  				return ErrInvalidLengthTypes
  1213  			}
  1214  			if (iNdEx + skippy) > l {
  1215  				return io.ErrUnexpectedEOF
  1216  			}
  1217  			iNdEx += skippy
  1218  		}
  1219  	}
  1220  
  1221  	if iNdEx > l {
  1222  		return io.ErrUnexpectedEOF
  1223  	}
  1224  	return nil
  1225  }
  1226  func (m *Message) Unmarshal(dAtA []byte) error {
  1227  	l := len(dAtA)
  1228  	iNdEx := 0
  1229  	for iNdEx < l {
  1230  		preIndex := iNdEx
  1231  		var wire uint64
  1232  		for shift := uint(0); ; shift += 7 {
  1233  			if shift >= 64 {
  1234  				return ErrIntOverflowTypes
  1235  			}
  1236  			if iNdEx >= l {
  1237  				return io.ErrUnexpectedEOF
  1238  			}
  1239  			b := dAtA[iNdEx]
  1240  			iNdEx++
  1241  			wire |= uint64(b&0x7F) << shift
  1242  			if b < 0x80 {
  1243  				break
  1244  			}
  1245  		}
  1246  		fieldNum := int32(wire >> 3)
  1247  		wireType := int(wire & 0x7)
  1248  		if wireType == 4 {
  1249  			return fmt.Errorf("proto: Message: wiretype end group for non-group")
  1250  		}
  1251  		if fieldNum <= 0 {
  1252  			return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire)
  1253  		}
  1254  		switch fieldNum {
  1255  		case 1:
  1256  			if wireType != 2 {
  1257  				return fmt.Errorf("proto: wrong wireType = %d for field BlockRequest", wireType)
  1258  			}
  1259  			var msglen int
  1260  			for shift := uint(0); ; shift += 7 {
  1261  				if shift >= 64 {
  1262  					return ErrIntOverflowTypes
  1263  				}
  1264  				if iNdEx >= l {
  1265  					return io.ErrUnexpectedEOF
  1266  				}
  1267  				b := dAtA[iNdEx]
  1268  				iNdEx++
  1269  				msglen |= int(b&0x7F) << shift
  1270  				if b < 0x80 {
  1271  					break
  1272  				}
  1273  			}
  1274  			if msglen < 0 {
  1275  				return ErrInvalidLengthTypes
  1276  			}
  1277  			postIndex := iNdEx + msglen
  1278  			if postIndex < 0 {
  1279  				return ErrInvalidLengthTypes
  1280  			}
  1281  			if postIndex > l {
  1282  				return io.ErrUnexpectedEOF
  1283  			}
  1284  			v := &BlockRequest{}
  1285  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1286  				return err
  1287  			}
  1288  			m.Sum = &Message_BlockRequest{v}
  1289  			iNdEx = postIndex
  1290  		case 2:
  1291  			if wireType != 2 {
  1292  				return fmt.Errorf("proto: wrong wireType = %d for field NoBlockResponse", wireType)
  1293  			}
  1294  			var msglen int
  1295  			for shift := uint(0); ; shift += 7 {
  1296  				if shift >= 64 {
  1297  					return ErrIntOverflowTypes
  1298  				}
  1299  				if iNdEx >= l {
  1300  					return io.ErrUnexpectedEOF
  1301  				}
  1302  				b := dAtA[iNdEx]
  1303  				iNdEx++
  1304  				msglen |= int(b&0x7F) << shift
  1305  				if b < 0x80 {
  1306  					break
  1307  				}
  1308  			}
  1309  			if msglen < 0 {
  1310  				return ErrInvalidLengthTypes
  1311  			}
  1312  			postIndex := iNdEx + msglen
  1313  			if postIndex < 0 {
  1314  				return ErrInvalidLengthTypes
  1315  			}
  1316  			if postIndex > l {
  1317  				return io.ErrUnexpectedEOF
  1318  			}
  1319  			v := &NoBlockResponse{}
  1320  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1321  				return err
  1322  			}
  1323  			m.Sum = &Message_NoBlockResponse{v}
  1324  			iNdEx = postIndex
  1325  		case 3:
  1326  			if wireType != 2 {
  1327  				return fmt.Errorf("proto: wrong wireType = %d for field BlockResponse", wireType)
  1328  			}
  1329  			var msglen int
  1330  			for shift := uint(0); ; shift += 7 {
  1331  				if shift >= 64 {
  1332  					return ErrIntOverflowTypes
  1333  				}
  1334  				if iNdEx >= l {
  1335  					return io.ErrUnexpectedEOF
  1336  				}
  1337  				b := dAtA[iNdEx]
  1338  				iNdEx++
  1339  				msglen |= int(b&0x7F) << shift
  1340  				if b < 0x80 {
  1341  					break
  1342  				}
  1343  			}
  1344  			if msglen < 0 {
  1345  				return ErrInvalidLengthTypes
  1346  			}
  1347  			postIndex := iNdEx + msglen
  1348  			if postIndex < 0 {
  1349  				return ErrInvalidLengthTypes
  1350  			}
  1351  			if postIndex > l {
  1352  				return io.ErrUnexpectedEOF
  1353  			}
  1354  			v := &BlockResponse{}
  1355  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1356  				return err
  1357  			}
  1358  			m.Sum = &Message_BlockResponse{v}
  1359  			iNdEx = postIndex
  1360  		case 4:
  1361  			if wireType != 2 {
  1362  				return fmt.Errorf("proto: wrong wireType = %d for field StatusRequest", wireType)
  1363  			}
  1364  			var msglen int
  1365  			for shift := uint(0); ; shift += 7 {
  1366  				if shift >= 64 {
  1367  					return ErrIntOverflowTypes
  1368  				}
  1369  				if iNdEx >= l {
  1370  					return io.ErrUnexpectedEOF
  1371  				}
  1372  				b := dAtA[iNdEx]
  1373  				iNdEx++
  1374  				msglen |= int(b&0x7F) << shift
  1375  				if b < 0x80 {
  1376  					break
  1377  				}
  1378  			}
  1379  			if msglen < 0 {
  1380  				return ErrInvalidLengthTypes
  1381  			}
  1382  			postIndex := iNdEx + msglen
  1383  			if postIndex < 0 {
  1384  				return ErrInvalidLengthTypes
  1385  			}
  1386  			if postIndex > l {
  1387  				return io.ErrUnexpectedEOF
  1388  			}
  1389  			v := &StatusRequest{}
  1390  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1391  				return err
  1392  			}
  1393  			m.Sum = &Message_StatusRequest{v}
  1394  			iNdEx = postIndex
  1395  		case 5:
  1396  			if wireType != 2 {
  1397  				return fmt.Errorf("proto: wrong wireType = %d for field StatusResponse", wireType)
  1398  			}
  1399  			var msglen int
  1400  			for shift := uint(0); ; shift += 7 {
  1401  				if shift >= 64 {
  1402  					return ErrIntOverflowTypes
  1403  				}
  1404  				if iNdEx >= l {
  1405  					return io.ErrUnexpectedEOF
  1406  				}
  1407  				b := dAtA[iNdEx]
  1408  				iNdEx++
  1409  				msglen |= int(b&0x7F) << shift
  1410  				if b < 0x80 {
  1411  					break
  1412  				}
  1413  			}
  1414  			if msglen < 0 {
  1415  				return ErrInvalidLengthTypes
  1416  			}
  1417  			postIndex := iNdEx + msglen
  1418  			if postIndex < 0 {
  1419  				return ErrInvalidLengthTypes
  1420  			}
  1421  			if postIndex > l {
  1422  				return io.ErrUnexpectedEOF
  1423  			}
  1424  			v := &StatusResponse{}
  1425  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1426  				return err
  1427  			}
  1428  			m.Sum = &Message_StatusResponse{v}
  1429  			iNdEx = postIndex
  1430  		default:
  1431  			iNdEx = preIndex
  1432  			skippy, err := skipTypes(dAtA[iNdEx:])
  1433  			if err != nil {
  1434  				return err
  1435  			}
  1436  			if skippy < 0 {
  1437  				return ErrInvalidLengthTypes
  1438  			}
  1439  			if (iNdEx + skippy) < 0 {
  1440  				return ErrInvalidLengthTypes
  1441  			}
  1442  			if (iNdEx + skippy) > l {
  1443  				return io.ErrUnexpectedEOF
  1444  			}
  1445  			iNdEx += skippy
  1446  		}
  1447  	}
  1448  
  1449  	if iNdEx > l {
  1450  		return io.ErrUnexpectedEOF
  1451  	}
  1452  	return nil
  1453  }
  1454  func skipTypes(dAtA []byte) (n int, err error) {
  1455  	l := len(dAtA)
  1456  	iNdEx := 0
  1457  	depth := 0
  1458  	for iNdEx < l {
  1459  		var wire uint64
  1460  		for shift := uint(0); ; shift += 7 {
  1461  			if shift >= 64 {
  1462  				return 0, ErrIntOverflowTypes
  1463  			}
  1464  			if iNdEx >= l {
  1465  				return 0, io.ErrUnexpectedEOF
  1466  			}
  1467  			b := dAtA[iNdEx]
  1468  			iNdEx++
  1469  			wire |= (uint64(b) & 0x7F) << shift
  1470  			if b < 0x80 {
  1471  				break
  1472  			}
  1473  		}
  1474  		wireType := int(wire & 0x7)
  1475  		switch wireType {
  1476  		case 0:
  1477  			for shift := uint(0); ; shift += 7 {
  1478  				if shift >= 64 {
  1479  					return 0, ErrIntOverflowTypes
  1480  				}
  1481  				if iNdEx >= l {
  1482  					return 0, io.ErrUnexpectedEOF
  1483  				}
  1484  				iNdEx++
  1485  				if dAtA[iNdEx-1] < 0x80 {
  1486  					break
  1487  				}
  1488  			}
  1489  		case 1:
  1490  			iNdEx += 8
  1491  		case 2:
  1492  			var length int
  1493  			for shift := uint(0); ; shift += 7 {
  1494  				if shift >= 64 {
  1495  					return 0, ErrIntOverflowTypes
  1496  				}
  1497  				if iNdEx >= l {
  1498  					return 0, io.ErrUnexpectedEOF
  1499  				}
  1500  				b := dAtA[iNdEx]
  1501  				iNdEx++
  1502  				length |= (int(b) & 0x7F) << shift
  1503  				if b < 0x80 {
  1504  					break
  1505  				}
  1506  			}
  1507  			if length < 0 {
  1508  				return 0, ErrInvalidLengthTypes
  1509  			}
  1510  			iNdEx += length
  1511  		case 3:
  1512  			depth++
  1513  		case 4:
  1514  			if depth == 0 {
  1515  				return 0, ErrUnexpectedEndOfGroupTypes
  1516  			}
  1517  			depth--
  1518  		case 5:
  1519  			iNdEx += 4
  1520  		default:
  1521  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1522  		}
  1523  		if iNdEx < 0 {
  1524  			return 0, ErrInvalidLengthTypes
  1525  		}
  1526  		if depth == 0 {
  1527  			return iNdEx, nil
  1528  		}
  1529  	}
  1530  	return 0, io.ErrUnexpectedEOF
  1531  }
  1532  
  1533  var (
  1534  	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
  1535  	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
  1536  	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  1537  )