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

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: tendermint/statesync/types.proto
     3  
     4  package statesync
     5  
     6  import (
     7  	fmt "fmt"
     8  	types "github.com/ari-anchor/sei-tendermint/proto/tendermint/types"
     9  	_ "github.com/gogo/protobuf/gogoproto"
    10  	proto "github.com/gogo/protobuf/proto"
    11  	io "io"
    12  	math "math"
    13  	math_bits "math/bits"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    26  
    27  type Message struct {
    28  	// Types that are valid to be assigned to Sum:
    29  	//	*Message_SnapshotsRequest
    30  	//	*Message_SnapshotsResponse
    31  	//	*Message_ChunkRequest
    32  	//	*Message_ChunkResponse
    33  	//	*Message_LightBlockRequest
    34  	//	*Message_LightBlockResponse
    35  	//	*Message_ParamsRequest
    36  	//	*Message_ParamsResponse
    37  	Sum isMessage_Sum `protobuf_oneof:"sum"`
    38  }
    39  
    40  func (m *Message) Reset()         { *m = Message{} }
    41  func (m *Message) String() string { return proto.CompactTextString(m) }
    42  func (*Message) ProtoMessage()    {}
    43  func (*Message) Descriptor() ([]byte, []int) {
    44  	return fileDescriptor_a1c2869546ca7914, []int{0}
    45  }
    46  func (m *Message) XXX_Unmarshal(b []byte) error {
    47  	return m.Unmarshal(b)
    48  }
    49  func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    50  	if deterministic {
    51  		return xxx_messageInfo_Message.Marshal(b, m, deterministic)
    52  	} else {
    53  		b = b[:cap(b)]
    54  		n, err := m.MarshalToSizedBuffer(b)
    55  		if err != nil {
    56  			return nil, err
    57  		}
    58  		return b[:n], nil
    59  	}
    60  }
    61  func (m *Message) XXX_Merge(src proto.Message) {
    62  	xxx_messageInfo_Message.Merge(m, src)
    63  }
    64  func (m *Message) XXX_Size() int {
    65  	return m.Size()
    66  }
    67  func (m *Message) XXX_DiscardUnknown() {
    68  	xxx_messageInfo_Message.DiscardUnknown(m)
    69  }
    70  
    71  var xxx_messageInfo_Message proto.InternalMessageInfo
    72  
    73  type isMessage_Sum interface {
    74  	isMessage_Sum()
    75  	MarshalTo([]byte) (int, error)
    76  	Size() int
    77  }
    78  
    79  type Message_SnapshotsRequest struct {
    80  	SnapshotsRequest *SnapshotsRequest `protobuf:"bytes,1,opt,name=snapshots_request,json=snapshotsRequest,proto3,oneof" json:"snapshots_request,omitempty"`
    81  }
    82  type Message_SnapshotsResponse struct {
    83  	SnapshotsResponse *SnapshotsResponse `protobuf:"bytes,2,opt,name=snapshots_response,json=snapshotsResponse,proto3,oneof" json:"snapshots_response,omitempty"`
    84  }
    85  type Message_ChunkRequest struct {
    86  	ChunkRequest *ChunkRequest `protobuf:"bytes,3,opt,name=chunk_request,json=chunkRequest,proto3,oneof" json:"chunk_request,omitempty"`
    87  }
    88  type Message_ChunkResponse struct {
    89  	ChunkResponse *ChunkResponse `protobuf:"bytes,4,opt,name=chunk_response,json=chunkResponse,proto3,oneof" json:"chunk_response,omitempty"`
    90  }
    91  type Message_LightBlockRequest struct {
    92  	LightBlockRequest *LightBlockRequest `protobuf:"bytes,5,opt,name=light_block_request,json=lightBlockRequest,proto3,oneof" json:"light_block_request,omitempty"`
    93  }
    94  type Message_LightBlockResponse struct {
    95  	LightBlockResponse *LightBlockResponse `protobuf:"bytes,6,opt,name=light_block_response,json=lightBlockResponse,proto3,oneof" json:"light_block_response,omitempty"`
    96  }
    97  type Message_ParamsRequest struct {
    98  	ParamsRequest *ParamsRequest `protobuf:"bytes,7,opt,name=params_request,json=paramsRequest,proto3,oneof" json:"params_request,omitempty"`
    99  }
   100  type Message_ParamsResponse struct {
   101  	ParamsResponse *ParamsResponse `protobuf:"bytes,8,opt,name=params_response,json=paramsResponse,proto3,oneof" json:"params_response,omitempty"`
   102  }
   103  
   104  func (*Message_SnapshotsRequest) isMessage_Sum()   {}
   105  func (*Message_SnapshotsResponse) isMessage_Sum()  {}
   106  func (*Message_ChunkRequest) isMessage_Sum()       {}
   107  func (*Message_ChunkResponse) isMessage_Sum()      {}
   108  func (*Message_LightBlockRequest) isMessage_Sum()  {}
   109  func (*Message_LightBlockResponse) isMessage_Sum() {}
   110  func (*Message_ParamsRequest) isMessage_Sum()      {}
   111  func (*Message_ParamsResponse) isMessage_Sum()     {}
   112  
   113  func (m *Message) GetSum() isMessage_Sum {
   114  	if m != nil {
   115  		return m.Sum
   116  	}
   117  	return nil
   118  }
   119  
   120  func (m *Message) GetSnapshotsRequest() *SnapshotsRequest {
   121  	if x, ok := m.GetSum().(*Message_SnapshotsRequest); ok {
   122  		return x.SnapshotsRequest
   123  	}
   124  	return nil
   125  }
   126  
   127  func (m *Message) GetSnapshotsResponse() *SnapshotsResponse {
   128  	if x, ok := m.GetSum().(*Message_SnapshotsResponse); ok {
   129  		return x.SnapshotsResponse
   130  	}
   131  	return nil
   132  }
   133  
   134  func (m *Message) GetChunkRequest() *ChunkRequest {
   135  	if x, ok := m.GetSum().(*Message_ChunkRequest); ok {
   136  		return x.ChunkRequest
   137  	}
   138  	return nil
   139  }
   140  
   141  func (m *Message) GetChunkResponse() *ChunkResponse {
   142  	if x, ok := m.GetSum().(*Message_ChunkResponse); ok {
   143  		return x.ChunkResponse
   144  	}
   145  	return nil
   146  }
   147  
   148  func (m *Message) GetLightBlockRequest() *LightBlockRequest {
   149  	if x, ok := m.GetSum().(*Message_LightBlockRequest); ok {
   150  		return x.LightBlockRequest
   151  	}
   152  	return nil
   153  }
   154  
   155  func (m *Message) GetLightBlockResponse() *LightBlockResponse {
   156  	if x, ok := m.GetSum().(*Message_LightBlockResponse); ok {
   157  		return x.LightBlockResponse
   158  	}
   159  	return nil
   160  }
   161  
   162  func (m *Message) GetParamsRequest() *ParamsRequest {
   163  	if x, ok := m.GetSum().(*Message_ParamsRequest); ok {
   164  		return x.ParamsRequest
   165  	}
   166  	return nil
   167  }
   168  
   169  func (m *Message) GetParamsResponse() *ParamsResponse {
   170  	if x, ok := m.GetSum().(*Message_ParamsResponse); ok {
   171  		return x.ParamsResponse
   172  	}
   173  	return nil
   174  }
   175  
   176  // XXX_OneofWrappers is for the internal use of the proto package.
   177  func (*Message) XXX_OneofWrappers() []interface{} {
   178  	return []interface{}{
   179  		(*Message_SnapshotsRequest)(nil),
   180  		(*Message_SnapshotsResponse)(nil),
   181  		(*Message_ChunkRequest)(nil),
   182  		(*Message_ChunkResponse)(nil),
   183  		(*Message_LightBlockRequest)(nil),
   184  		(*Message_LightBlockResponse)(nil),
   185  		(*Message_ParamsRequest)(nil),
   186  		(*Message_ParamsResponse)(nil),
   187  	}
   188  }
   189  
   190  type SnapshotsRequest struct {
   191  }
   192  
   193  func (m *SnapshotsRequest) Reset()         { *m = SnapshotsRequest{} }
   194  func (m *SnapshotsRequest) String() string { return proto.CompactTextString(m) }
   195  func (*SnapshotsRequest) ProtoMessage()    {}
   196  func (*SnapshotsRequest) Descriptor() ([]byte, []int) {
   197  	return fileDescriptor_a1c2869546ca7914, []int{1}
   198  }
   199  func (m *SnapshotsRequest) XXX_Unmarshal(b []byte) error {
   200  	return m.Unmarshal(b)
   201  }
   202  func (m *SnapshotsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   203  	if deterministic {
   204  		return xxx_messageInfo_SnapshotsRequest.Marshal(b, m, deterministic)
   205  	} else {
   206  		b = b[:cap(b)]
   207  		n, err := m.MarshalToSizedBuffer(b)
   208  		if err != nil {
   209  			return nil, err
   210  		}
   211  		return b[:n], nil
   212  	}
   213  }
   214  func (m *SnapshotsRequest) XXX_Merge(src proto.Message) {
   215  	xxx_messageInfo_SnapshotsRequest.Merge(m, src)
   216  }
   217  func (m *SnapshotsRequest) XXX_Size() int {
   218  	return m.Size()
   219  }
   220  func (m *SnapshotsRequest) XXX_DiscardUnknown() {
   221  	xxx_messageInfo_SnapshotsRequest.DiscardUnknown(m)
   222  }
   223  
   224  var xxx_messageInfo_SnapshotsRequest proto.InternalMessageInfo
   225  
   226  type SnapshotsResponse struct {
   227  	Height   uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
   228  	Format   uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
   229  	Chunks   uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"`
   230  	Hash     []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
   231  	Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
   232  }
   233  
   234  func (m *SnapshotsResponse) Reset()         { *m = SnapshotsResponse{} }
   235  func (m *SnapshotsResponse) String() string { return proto.CompactTextString(m) }
   236  func (*SnapshotsResponse) ProtoMessage()    {}
   237  func (*SnapshotsResponse) Descriptor() ([]byte, []int) {
   238  	return fileDescriptor_a1c2869546ca7914, []int{2}
   239  }
   240  func (m *SnapshotsResponse) XXX_Unmarshal(b []byte) error {
   241  	return m.Unmarshal(b)
   242  }
   243  func (m *SnapshotsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   244  	if deterministic {
   245  		return xxx_messageInfo_SnapshotsResponse.Marshal(b, m, deterministic)
   246  	} else {
   247  		b = b[:cap(b)]
   248  		n, err := m.MarshalToSizedBuffer(b)
   249  		if err != nil {
   250  			return nil, err
   251  		}
   252  		return b[:n], nil
   253  	}
   254  }
   255  func (m *SnapshotsResponse) XXX_Merge(src proto.Message) {
   256  	xxx_messageInfo_SnapshotsResponse.Merge(m, src)
   257  }
   258  func (m *SnapshotsResponse) XXX_Size() int {
   259  	return m.Size()
   260  }
   261  func (m *SnapshotsResponse) XXX_DiscardUnknown() {
   262  	xxx_messageInfo_SnapshotsResponse.DiscardUnknown(m)
   263  }
   264  
   265  var xxx_messageInfo_SnapshotsResponse proto.InternalMessageInfo
   266  
   267  func (m *SnapshotsResponse) GetHeight() uint64 {
   268  	if m != nil {
   269  		return m.Height
   270  	}
   271  	return 0
   272  }
   273  
   274  func (m *SnapshotsResponse) GetFormat() uint32 {
   275  	if m != nil {
   276  		return m.Format
   277  	}
   278  	return 0
   279  }
   280  
   281  func (m *SnapshotsResponse) GetChunks() uint32 {
   282  	if m != nil {
   283  		return m.Chunks
   284  	}
   285  	return 0
   286  }
   287  
   288  func (m *SnapshotsResponse) GetHash() []byte {
   289  	if m != nil {
   290  		return m.Hash
   291  	}
   292  	return nil
   293  }
   294  
   295  func (m *SnapshotsResponse) GetMetadata() []byte {
   296  	if m != nil {
   297  		return m.Metadata
   298  	}
   299  	return nil
   300  }
   301  
   302  type ChunkRequest struct {
   303  	Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
   304  	Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
   305  	Index  uint32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
   306  }
   307  
   308  func (m *ChunkRequest) Reset()         { *m = ChunkRequest{} }
   309  func (m *ChunkRequest) String() string { return proto.CompactTextString(m) }
   310  func (*ChunkRequest) ProtoMessage()    {}
   311  func (*ChunkRequest) Descriptor() ([]byte, []int) {
   312  	return fileDescriptor_a1c2869546ca7914, []int{3}
   313  }
   314  func (m *ChunkRequest) XXX_Unmarshal(b []byte) error {
   315  	return m.Unmarshal(b)
   316  }
   317  func (m *ChunkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   318  	if deterministic {
   319  		return xxx_messageInfo_ChunkRequest.Marshal(b, m, deterministic)
   320  	} else {
   321  		b = b[:cap(b)]
   322  		n, err := m.MarshalToSizedBuffer(b)
   323  		if err != nil {
   324  			return nil, err
   325  		}
   326  		return b[:n], nil
   327  	}
   328  }
   329  func (m *ChunkRequest) XXX_Merge(src proto.Message) {
   330  	xxx_messageInfo_ChunkRequest.Merge(m, src)
   331  }
   332  func (m *ChunkRequest) XXX_Size() int {
   333  	return m.Size()
   334  }
   335  func (m *ChunkRequest) XXX_DiscardUnknown() {
   336  	xxx_messageInfo_ChunkRequest.DiscardUnknown(m)
   337  }
   338  
   339  var xxx_messageInfo_ChunkRequest proto.InternalMessageInfo
   340  
   341  func (m *ChunkRequest) GetHeight() uint64 {
   342  	if m != nil {
   343  		return m.Height
   344  	}
   345  	return 0
   346  }
   347  
   348  func (m *ChunkRequest) GetFormat() uint32 {
   349  	if m != nil {
   350  		return m.Format
   351  	}
   352  	return 0
   353  }
   354  
   355  func (m *ChunkRequest) GetIndex() uint32 {
   356  	if m != nil {
   357  		return m.Index
   358  	}
   359  	return 0
   360  }
   361  
   362  type ChunkResponse struct {
   363  	Height  uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
   364  	Format  uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
   365  	Index   uint32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
   366  	Chunk   []byte `protobuf:"bytes,4,opt,name=chunk,proto3" json:"chunk,omitempty"`
   367  	Missing bool   `protobuf:"varint,5,opt,name=missing,proto3" json:"missing,omitempty"`
   368  }
   369  
   370  func (m *ChunkResponse) Reset()         { *m = ChunkResponse{} }
   371  func (m *ChunkResponse) String() string { return proto.CompactTextString(m) }
   372  func (*ChunkResponse) ProtoMessage()    {}
   373  func (*ChunkResponse) Descriptor() ([]byte, []int) {
   374  	return fileDescriptor_a1c2869546ca7914, []int{4}
   375  }
   376  func (m *ChunkResponse) XXX_Unmarshal(b []byte) error {
   377  	return m.Unmarshal(b)
   378  }
   379  func (m *ChunkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   380  	if deterministic {
   381  		return xxx_messageInfo_ChunkResponse.Marshal(b, m, deterministic)
   382  	} else {
   383  		b = b[:cap(b)]
   384  		n, err := m.MarshalToSizedBuffer(b)
   385  		if err != nil {
   386  			return nil, err
   387  		}
   388  		return b[:n], nil
   389  	}
   390  }
   391  func (m *ChunkResponse) XXX_Merge(src proto.Message) {
   392  	xxx_messageInfo_ChunkResponse.Merge(m, src)
   393  }
   394  func (m *ChunkResponse) XXX_Size() int {
   395  	return m.Size()
   396  }
   397  func (m *ChunkResponse) XXX_DiscardUnknown() {
   398  	xxx_messageInfo_ChunkResponse.DiscardUnknown(m)
   399  }
   400  
   401  var xxx_messageInfo_ChunkResponse proto.InternalMessageInfo
   402  
   403  func (m *ChunkResponse) GetHeight() uint64 {
   404  	if m != nil {
   405  		return m.Height
   406  	}
   407  	return 0
   408  }
   409  
   410  func (m *ChunkResponse) GetFormat() uint32 {
   411  	if m != nil {
   412  		return m.Format
   413  	}
   414  	return 0
   415  }
   416  
   417  func (m *ChunkResponse) GetIndex() uint32 {
   418  	if m != nil {
   419  		return m.Index
   420  	}
   421  	return 0
   422  }
   423  
   424  func (m *ChunkResponse) GetChunk() []byte {
   425  	if m != nil {
   426  		return m.Chunk
   427  	}
   428  	return nil
   429  }
   430  
   431  func (m *ChunkResponse) GetMissing() bool {
   432  	if m != nil {
   433  		return m.Missing
   434  	}
   435  	return false
   436  }
   437  
   438  type LightBlockRequest struct {
   439  	Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
   440  }
   441  
   442  func (m *LightBlockRequest) Reset()         { *m = LightBlockRequest{} }
   443  func (m *LightBlockRequest) String() string { return proto.CompactTextString(m) }
   444  func (*LightBlockRequest) ProtoMessage()    {}
   445  func (*LightBlockRequest) Descriptor() ([]byte, []int) {
   446  	return fileDescriptor_a1c2869546ca7914, []int{5}
   447  }
   448  func (m *LightBlockRequest) XXX_Unmarshal(b []byte) error {
   449  	return m.Unmarshal(b)
   450  }
   451  func (m *LightBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   452  	if deterministic {
   453  		return xxx_messageInfo_LightBlockRequest.Marshal(b, m, deterministic)
   454  	} else {
   455  		b = b[:cap(b)]
   456  		n, err := m.MarshalToSizedBuffer(b)
   457  		if err != nil {
   458  			return nil, err
   459  		}
   460  		return b[:n], nil
   461  	}
   462  }
   463  func (m *LightBlockRequest) XXX_Merge(src proto.Message) {
   464  	xxx_messageInfo_LightBlockRequest.Merge(m, src)
   465  }
   466  func (m *LightBlockRequest) XXX_Size() int {
   467  	return m.Size()
   468  }
   469  func (m *LightBlockRequest) XXX_DiscardUnknown() {
   470  	xxx_messageInfo_LightBlockRequest.DiscardUnknown(m)
   471  }
   472  
   473  var xxx_messageInfo_LightBlockRequest proto.InternalMessageInfo
   474  
   475  func (m *LightBlockRequest) GetHeight() uint64 {
   476  	if m != nil {
   477  		return m.Height
   478  	}
   479  	return 0
   480  }
   481  
   482  type LightBlockResponse struct {
   483  	LightBlock *types.LightBlock `protobuf:"bytes,1,opt,name=light_block,json=lightBlock,proto3" json:"light_block,omitempty"`
   484  }
   485  
   486  func (m *LightBlockResponse) Reset()         { *m = LightBlockResponse{} }
   487  func (m *LightBlockResponse) String() string { return proto.CompactTextString(m) }
   488  func (*LightBlockResponse) ProtoMessage()    {}
   489  func (*LightBlockResponse) Descriptor() ([]byte, []int) {
   490  	return fileDescriptor_a1c2869546ca7914, []int{6}
   491  }
   492  func (m *LightBlockResponse) XXX_Unmarshal(b []byte) error {
   493  	return m.Unmarshal(b)
   494  }
   495  func (m *LightBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   496  	if deterministic {
   497  		return xxx_messageInfo_LightBlockResponse.Marshal(b, m, deterministic)
   498  	} else {
   499  		b = b[:cap(b)]
   500  		n, err := m.MarshalToSizedBuffer(b)
   501  		if err != nil {
   502  			return nil, err
   503  		}
   504  		return b[:n], nil
   505  	}
   506  }
   507  func (m *LightBlockResponse) XXX_Merge(src proto.Message) {
   508  	xxx_messageInfo_LightBlockResponse.Merge(m, src)
   509  }
   510  func (m *LightBlockResponse) XXX_Size() int {
   511  	return m.Size()
   512  }
   513  func (m *LightBlockResponse) XXX_DiscardUnknown() {
   514  	xxx_messageInfo_LightBlockResponse.DiscardUnknown(m)
   515  }
   516  
   517  var xxx_messageInfo_LightBlockResponse proto.InternalMessageInfo
   518  
   519  func (m *LightBlockResponse) GetLightBlock() *types.LightBlock {
   520  	if m != nil {
   521  		return m.LightBlock
   522  	}
   523  	return nil
   524  }
   525  
   526  type ParamsRequest struct {
   527  	Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
   528  }
   529  
   530  func (m *ParamsRequest) Reset()         { *m = ParamsRequest{} }
   531  func (m *ParamsRequest) String() string { return proto.CompactTextString(m) }
   532  func (*ParamsRequest) ProtoMessage()    {}
   533  func (*ParamsRequest) Descriptor() ([]byte, []int) {
   534  	return fileDescriptor_a1c2869546ca7914, []int{7}
   535  }
   536  func (m *ParamsRequest) XXX_Unmarshal(b []byte) error {
   537  	return m.Unmarshal(b)
   538  }
   539  func (m *ParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   540  	if deterministic {
   541  		return xxx_messageInfo_ParamsRequest.Marshal(b, m, deterministic)
   542  	} else {
   543  		b = b[:cap(b)]
   544  		n, err := m.MarshalToSizedBuffer(b)
   545  		if err != nil {
   546  			return nil, err
   547  		}
   548  		return b[:n], nil
   549  	}
   550  }
   551  func (m *ParamsRequest) XXX_Merge(src proto.Message) {
   552  	xxx_messageInfo_ParamsRequest.Merge(m, src)
   553  }
   554  func (m *ParamsRequest) XXX_Size() int {
   555  	return m.Size()
   556  }
   557  func (m *ParamsRequest) XXX_DiscardUnknown() {
   558  	xxx_messageInfo_ParamsRequest.DiscardUnknown(m)
   559  }
   560  
   561  var xxx_messageInfo_ParamsRequest proto.InternalMessageInfo
   562  
   563  func (m *ParamsRequest) GetHeight() uint64 {
   564  	if m != nil {
   565  		return m.Height
   566  	}
   567  	return 0
   568  }
   569  
   570  type ParamsResponse struct {
   571  	Height          uint64                `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
   572  	ConsensusParams types.ConsensusParams `protobuf:"bytes,2,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"`
   573  }
   574  
   575  func (m *ParamsResponse) Reset()         { *m = ParamsResponse{} }
   576  func (m *ParamsResponse) String() string { return proto.CompactTextString(m) }
   577  func (*ParamsResponse) ProtoMessage()    {}
   578  func (*ParamsResponse) Descriptor() ([]byte, []int) {
   579  	return fileDescriptor_a1c2869546ca7914, []int{8}
   580  }
   581  func (m *ParamsResponse) XXX_Unmarshal(b []byte) error {
   582  	return m.Unmarshal(b)
   583  }
   584  func (m *ParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   585  	if deterministic {
   586  		return xxx_messageInfo_ParamsResponse.Marshal(b, m, deterministic)
   587  	} else {
   588  		b = b[:cap(b)]
   589  		n, err := m.MarshalToSizedBuffer(b)
   590  		if err != nil {
   591  			return nil, err
   592  		}
   593  		return b[:n], nil
   594  	}
   595  }
   596  func (m *ParamsResponse) XXX_Merge(src proto.Message) {
   597  	xxx_messageInfo_ParamsResponse.Merge(m, src)
   598  }
   599  func (m *ParamsResponse) XXX_Size() int {
   600  	return m.Size()
   601  }
   602  func (m *ParamsResponse) XXX_DiscardUnknown() {
   603  	xxx_messageInfo_ParamsResponse.DiscardUnknown(m)
   604  }
   605  
   606  var xxx_messageInfo_ParamsResponse proto.InternalMessageInfo
   607  
   608  func (m *ParamsResponse) GetHeight() uint64 {
   609  	if m != nil {
   610  		return m.Height
   611  	}
   612  	return 0
   613  }
   614  
   615  func (m *ParamsResponse) GetConsensusParams() types.ConsensusParams {
   616  	if m != nil {
   617  		return m.ConsensusParams
   618  	}
   619  	return types.ConsensusParams{}
   620  }
   621  
   622  func init() {
   623  	proto.RegisterType((*Message)(nil), "seitendermint.statesync.Message")
   624  	proto.RegisterType((*SnapshotsRequest)(nil), "seitendermint.statesync.SnapshotsRequest")
   625  	proto.RegisterType((*SnapshotsResponse)(nil), "seitendermint.statesync.SnapshotsResponse")
   626  	proto.RegisterType((*ChunkRequest)(nil), "seitendermint.statesync.ChunkRequest")
   627  	proto.RegisterType((*ChunkResponse)(nil), "seitendermint.statesync.ChunkResponse")
   628  	proto.RegisterType((*LightBlockRequest)(nil), "seitendermint.statesync.LightBlockRequest")
   629  	proto.RegisterType((*LightBlockResponse)(nil), "seitendermint.statesync.LightBlockResponse")
   630  	proto.RegisterType((*ParamsRequest)(nil), "seitendermint.statesync.ParamsRequest")
   631  	proto.RegisterType((*ParamsResponse)(nil), "seitendermint.statesync.ParamsResponse")
   632  }
   633  
   634  func init() { proto.RegisterFile("tendermint/statesync/types.proto", fileDescriptor_a1c2869546ca7914) }
   635  
   636  var fileDescriptor_a1c2869546ca7914 = []byte{
   637  	// 601 bytes of a gzipped FileDescriptorProto
   638  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0xcb, 0x6e, 0xd3, 0x40,
   639  	0x14, 0x86, 0x6d, 0x9a, 0x9b, 0x4e, 0xe3, 0x34, 0x19, 0x22, 0x88, 0x22, 0x70, 0x2b, 0x0b, 0x28,
   640  	0x50, 0x35, 0x91, 0xe0, 0x01, 0x40, 0xe9, 0xa6, 0x8b, 0x22, 0x90, 0xb9, 0x88, 0x9b, 0x14, 0x4d,
   641  	0x9c, 0xc1, 0xb6, 0x88, 0x2f, 0xf8, 0x4c, 0x24, 0xba, 0x62, 0xc5, 0x8a, 0x0d, 0x8f, 0x55, 0xb1,
   642  	0xea, 0x92, 0x15, 0x42, 0xc9, 0x8b, 0x20, 0x8f, 0x27, 0xb6, 0xe3, 0x34, 0x4a, 0x91, 0xba, 0xf3,
   643  	0xf9, 0x7d, 0xce, 0xa7, 0xff, 0x8c, 0x7f, 0x8d, 0x61, 0x8f, 0x33, 0x7f, 0xcc, 0x22, 0xcf, 0xf5,
   644  	0x79, 0x1f, 0x39, 0xe5, 0x0c, 0x4f, 0x7d, 0xab, 0xcf, 0x4f, 0x43, 0x86, 0xbd, 0x30, 0x0a, 0x78,
   645  	0x40, 0x6e, 0x22, 0x73, 0xb3, 0xa6, 0x5e, 0xda, 0xd4, 0x6d, 0xdb, 0x81, 0x1d, 0x88, 0x9e, 0x7e,
   646  	0xfc, 0x94, 0xb4, 0x77, 0x6f, 0xe5, 0x80, 0x02, 0x93, 0x87, 0x75, 0x6f, 0xaf, 0xbc, 0x0d, 0x69,
   647  	0x44, 0x3d, 0xf9, 0xda, 0xf8, 0x55, 0x86, 0xea, 0x33, 0x86, 0x48, 0x6d, 0x46, 0xde, 0x42, 0x0b,
   648  	0x7d, 0x1a, 0xa2, 0x13, 0x70, 0x1c, 0x46, 0xec, 0xcb, 0x94, 0x21, 0xef, 0xa8, 0x7b, 0xea, 0xfd,
   649  	0xed, 0x47, 0x0f, 0x7a, 0x6b, 0x3c, 0xf5, 0x5e, 0x2e, 0x26, 0xcc, 0x64, 0xe0, 0x58, 0x31, 0x9b,
   650  	0x58, 0xd0, 0xc8, 0x07, 0x20, 0x79, 0x32, 0x86, 0x81, 0x8f, 0xac, 0x73, 0x4d, 0xa0, 0x1f, 0x5e,
   651  	0x06, 0x9d, 0x4c, 0x1c, 0x2b, 0x66, 0x0b, 0x8b, 0x22, 0x39, 0x01, 0xcd, 0x72, 0xa6, 0xfe, 0xe7,
   652  	0xd4, 0xf2, 0x96, 0xe0, 0xde, 0x5d, 0xcb, 0x3d, 0x8a, 0xbb, 0x33, 0xbb, 0x75, 0x2b, 0x57, 0x93,
   653  	0xe7, 0xd0, 0x58, 0xd0, 0xa4, 0xcd, 0x92, 0xc0, 0xdd, 0xdb, 0x84, 0x4b, 0x2d, 0x6a, 0x56, 0x5e,
   654  	0x20, 0x1f, 0xe1, 0xfa, 0xc4, 0xb5, 0x1d, 0x3e, 0x1c, 0x4d, 0x02, 0x2b, 0x33, 0x59, 0xde, 0xb0,
   655  	0xfc, 0x49, 0x3c, 0x33, 0x88, 0x47, 0x32, 0xa7, 0xad, 0x49, 0x51, 0x24, 0x43, 0x68, 0x2f, 0xd3,
   656  	0xa5, 0xe9, 0x8a, 0xc0, 0x1f, 0x5c, 0x0a, 0x9f, 0x3a, 0x27, 0x93, 0x15, 0x35, 0x3e, 0x8f, 0x24,
   657  	0x30, 0xa9, 0xf3, 0xea, 0x86, 0xf3, 0x78, 0x21, 0xda, 0x33, 0xd7, 0x5a, 0x98, 0x17, 0x88, 0x09,
   658  	0x3b, 0x29, 0x50, 0x9a, 0xad, 0x09, 0xe2, 0xfe, 0x46, 0x62, 0x6a, 0xb4, 0x11, 0x2e, 0x29, 0x83,
   659  	0x32, 0x6c, 0xe1, 0xd4, 0x33, 0x08, 0x34, 0x8b, 0x71, 0x34, 0x7e, 0xa8, 0xd0, 0x5a, 0x09, 0x12,
   660  	0xb9, 0x01, 0x15, 0x87, 0xc5, 0xcb, 0x8a, 0x7c, 0x97, 0x4c, 0x59, 0xc5, 0xfa, 0xa7, 0x20, 0xf2,
   661  	0x28, 0x17, 0xe1, 0xd4, 0x4c, 0x59, 0xc5, 0xba, 0xf8, 0xaa, 0x28, 0xc2, 0xa5, 0x99, 0xb2, 0x22,
   662  	0x04, 0x4a, 0x0e, 0x45, 0x47, 0x64, 0xa4, 0x6e, 0x8a, 0x67, 0xd2, 0x85, 0x9a, 0xc7, 0x38, 0x1d,
   663  	0x53, 0x4e, 0xc5, 0x57, 0xae, 0x9b, 0x69, 0x6d, 0xbc, 0x82, 0x7a, 0x3e, 0x7d, 0xff, 0xed, 0xa3,
   664  	0x0d, 0x65, 0xd7, 0x1f, 0xb3, 0xaf, 0xd2, 0x46, 0x52, 0x18, 0xdf, 0x55, 0xd0, 0x96, 0x52, 0x78,
   665  	0x35, 0xdc, 0x58, 0x15, 0x7b, 0xca, 0xf5, 0x92, 0x82, 0x74, 0xa0, 0xea, 0xb9, 0x88, 0xae, 0x6f,
   666  	0x8b, 0xf5, 0x6a, 0xe6, 0xa2, 0x34, 0x0e, 0xa0, 0xb5, 0x12, 0xdb, 0x75, 0x56, 0x8c, 0x37, 0x40,
   667  	0x56, 0x43, 0x48, 0x9e, 0xc2, 0x76, 0x2e, 0xcf, 0xf2, 0xf6, 0xd9, 0x2d, 0x24, 0x23, 0xb9, 0xdf,
   668  	0x72, 0xd3, 0x90, 0x05, 0xd7, 0xd8, 0x07, 0x6d, 0x29, 0x81, 0x6b, 0x0d, 0x7c, 0x83, 0xc6, 0x72,
   669  	0xb0, 0xd6, 0x9e, 0xda, 0x6b, 0x68, 0x5a, 0x71, 0x83, 0x8f, 0x53, 0x1c, 0x26, 0xd1, 0x93, 0x97,
   670  	0xd7, 0x9d, 0x0b, 0x9d, 0x1d, 0x2d, 0x9a, 0x13, 0xfe, 0xa0, 0x74, 0xf6, 0x67, 0x57, 0x31, 0x77,
   671  	0xac, 0x82, 0xfc, 0xee, 0x6c, 0xa6, 0xab, 0xe7, 0x33, 0x5d, 0xfd, 0x3b, 0xd3, 0xd5, 0x9f, 0x73,
   672  	0x5d, 0x39, 0x9f, 0xeb, 0xca, 0xef, 0xb9, 0xae, 0xbc, 0x7f, 0x62, 0xbb, 0xdc, 0x99, 0x8e, 0x7a,
   673  	0x56, 0xe0, 0xf5, 0x69, 0xe4, 0x1e, 0x52, 0xdf, 0x72, 0x82, 0xa8, 0x8f, 0xcc, 0x3d, 0xcc, 0x5d,
   674  	0xe7, 0xc9, 0x9f, 0xe0, 0xa2, 0xdf, 0xc9, 0xa8, 0x22, 0xde, 0x3d, 0xfe, 0x17, 0x00, 0x00, 0xff,
   675  	0xff, 0xb5, 0x4f, 0xc3, 0x12, 0x6d, 0x06, 0x00, 0x00,
   676  }
   677  
   678  func (m *Message) Marshal() (dAtA []byte, err error) {
   679  	size := m.Size()
   680  	dAtA = make([]byte, size)
   681  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   682  	if err != nil {
   683  		return nil, err
   684  	}
   685  	return dAtA[:n], nil
   686  }
   687  
   688  func (m *Message) MarshalTo(dAtA []byte) (int, error) {
   689  	size := m.Size()
   690  	return m.MarshalToSizedBuffer(dAtA[:size])
   691  }
   692  
   693  func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   694  	i := len(dAtA)
   695  	_ = i
   696  	var l int
   697  	_ = l
   698  	if m.Sum != nil {
   699  		{
   700  			size := m.Sum.Size()
   701  			i -= size
   702  			if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil {
   703  				return 0, err
   704  			}
   705  		}
   706  	}
   707  	return len(dAtA) - i, nil
   708  }
   709  
   710  func (m *Message_SnapshotsRequest) MarshalTo(dAtA []byte) (int, error) {
   711  	size := m.Size()
   712  	return m.MarshalToSizedBuffer(dAtA[:size])
   713  }
   714  
   715  func (m *Message_SnapshotsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   716  	i := len(dAtA)
   717  	if m.SnapshotsRequest != nil {
   718  		{
   719  			size, err := m.SnapshotsRequest.MarshalToSizedBuffer(dAtA[:i])
   720  			if err != nil {
   721  				return 0, err
   722  			}
   723  			i -= size
   724  			i = encodeVarintTypes(dAtA, i, uint64(size))
   725  		}
   726  		i--
   727  		dAtA[i] = 0xa
   728  	}
   729  	return len(dAtA) - i, nil
   730  }
   731  func (m *Message_SnapshotsResponse) MarshalTo(dAtA []byte) (int, error) {
   732  	size := m.Size()
   733  	return m.MarshalToSizedBuffer(dAtA[:size])
   734  }
   735  
   736  func (m *Message_SnapshotsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   737  	i := len(dAtA)
   738  	if m.SnapshotsResponse != nil {
   739  		{
   740  			size, err := m.SnapshotsResponse.MarshalToSizedBuffer(dAtA[:i])
   741  			if err != nil {
   742  				return 0, err
   743  			}
   744  			i -= size
   745  			i = encodeVarintTypes(dAtA, i, uint64(size))
   746  		}
   747  		i--
   748  		dAtA[i] = 0x12
   749  	}
   750  	return len(dAtA) - i, nil
   751  }
   752  func (m *Message_ChunkRequest) MarshalTo(dAtA []byte) (int, error) {
   753  	size := m.Size()
   754  	return m.MarshalToSizedBuffer(dAtA[:size])
   755  }
   756  
   757  func (m *Message_ChunkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   758  	i := len(dAtA)
   759  	if m.ChunkRequest != nil {
   760  		{
   761  			size, err := m.ChunkRequest.MarshalToSizedBuffer(dAtA[:i])
   762  			if err != nil {
   763  				return 0, err
   764  			}
   765  			i -= size
   766  			i = encodeVarintTypes(dAtA, i, uint64(size))
   767  		}
   768  		i--
   769  		dAtA[i] = 0x1a
   770  	}
   771  	return len(dAtA) - i, nil
   772  }
   773  func (m *Message_ChunkResponse) MarshalTo(dAtA []byte) (int, error) {
   774  	size := m.Size()
   775  	return m.MarshalToSizedBuffer(dAtA[:size])
   776  }
   777  
   778  func (m *Message_ChunkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   779  	i := len(dAtA)
   780  	if m.ChunkResponse != nil {
   781  		{
   782  			size, err := m.ChunkResponse.MarshalToSizedBuffer(dAtA[:i])
   783  			if err != nil {
   784  				return 0, err
   785  			}
   786  			i -= size
   787  			i = encodeVarintTypes(dAtA, i, uint64(size))
   788  		}
   789  		i--
   790  		dAtA[i] = 0x22
   791  	}
   792  	return len(dAtA) - i, nil
   793  }
   794  func (m *Message_LightBlockRequest) MarshalTo(dAtA []byte) (int, error) {
   795  	size := m.Size()
   796  	return m.MarshalToSizedBuffer(dAtA[:size])
   797  }
   798  
   799  func (m *Message_LightBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   800  	i := len(dAtA)
   801  	if m.LightBlockRequest != nil {
   802  		{
   803  			size, err := m.LightBlockRequest.MarshalToSizedBuffer(dAtA[:i])
   804  			if err != nil {
   805  				return 0, err
   806  			}
   807  			i -= size
   808  			i = encodeVarintTypes(dAtA, i, uint64(size))
   809  		}
   810  		i--
   811  		dAtA[i] = 0x2a
   812  	}
   813  	return len(dAtA) - i, nil
   814  }
   815  func (m *Message_LightBlockResponse) MarshalTo(dAtA []byte) (int, error) {
   816  	size := m.Size()
   817  	return m.MarshalToSizedBuffer(dAtA[:size])
   818  }
   819  
   820  func (m *Message_LightBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   821  	i := len(dAtA)
   822  	if m.LightBlockResponse != nil {
   823  		{
   824  			size, err := m.LightBlockResponse.MarshalToSizedBuffer(dAtA[:i])
   825  			if err != nil {
   826  				return 0, err
   827  			}
   828  			i -= size
   829  			i = encodeVarintTypes(dAtA, i, uint64(size))
   830  		}
   831  		i--
   832  		dAtA[i] = 0x32
   833  	}
   834  	return len(dAtA) - i, nil
   835  }
   836  func (m *Message_ParamsRequest) MarshalTo(dAtA []byte) (int, error) {
   837  	size := m.Size()
   838  	return m.MarshalToSizedBuffer(dAtA[:size])
   839  }
   840  
   841  func (m *Message_ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   842  	i := len(dAtA)
   843  	if m.ParamsRequest != nil {
   844  		{
   845  			size, err := m.ParamsRequest.MarshalToSizedBuffer(dAtA[:i])
   846  			if err != nil {
   847  				return 0, err
   848  			}
   849  			i -= size
   850  			i = encodeVarintTypes(dAtA, i, uint64(size))
   851  		}
   852  		i--
   853  		dAtA[i] = 0x3a
   854  	}
   855  	return len(dAtA) - i, nil
   856  }
   857  func (m *Message_ParamsResponse) MarshalTo(dAtA []byte) (int, error) {
   858  	size := m.Size()
   859  	return m.MarshalToSizedBuffer(dAtA[:size])
   860  }
   861  
   862  func (m *Message_ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   863  	i := len(dAtA)
   864  	if m.ParamsResponse != nil {
   865  		{
   866  			size, err := m.ParamsResponse.MarshalToSizedBuffer(dAtA[:i])
   867  			if err != nil {
   868  				return 0, err
   869  			}
   870  			i -= size
   871  			i = encodeVarintTypes(dAtA, i, uint64(size))
   872  		}
   873  		i--
   874  		dAtA[i] = 0x42
   875  	}
   876  	return len(dAtA) - i, nil
   877  }
   878  func (m *SnapshotsRequest) Marshal() (dAtA []byte, err error) {
   879  	size := m.Size()
   880  	dAtA = make([]byte, size)
   881  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   882  	if err != nil {
   883  		return nil, err
   884  	}
   885  	return dAtA[:n], nil
   886  }
   887  
   888  func (m *SnapshotsRequest) MarshalTo(dAtA []byte) (int, error) {
   889  	size := m.Size()
   890  	return m.MarshalToSizedBuffer(dAtA[:size])
   891  }
   892  
   893  func (m *SnapshotsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   894  	i := len(dAtA)
   895  	_ = i
   896  	var l int
   897  	_ = l
   898  	return len(dAtA) - i, nil
   899  }
   900  
   901  func (m *SnapshotsResponse) Marshal() (dAtA []byte, err error) {
   902  	size := m.Size()
   903  	dAtA = make([]byte, size)
   904  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   905  	if err != nil {
   906  		return nil, err
   907  	}
   908  	return dAtA[:n], nil
   909  }
   910  
   911  func (m *SnapshotsResponse) MarshalTo(dAtA []byte) (int, error) {
   912  	size := m.Size()
   913  	return m.MarshalToSizedBuffer(dAtA[:size])
   914  }
   915  
   916  func (m *SnapshotsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   917  	i := len(dAtA)
   918  	_ = i
   919  	var l int
   920  	_ = l
   921  	if len(m.Metadata) > 0 {
   922  		i -= len(m.Metadata)
   923  		copy(dAtA[i:], m.Metadata)
   924  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Metadata)))
   925  		i--
   926  		dAtA[i] = 0x2a
   927  	}
   928  	if len(m.Hash) > 0 {
   929  		i -= len(m.Hash)
   930  		copy(dAtA[i:], m.Hash)
   931  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
   932  		i--
   933  		dAtA[i] = 0x22
   934  	}
   935  	if m.Chunks != 0 {
   936  		i = encodeVarintTypes(dAtA, i, uint64(m.Chunks))
   937  		i--
   938  		dAtA[i] = 0x18
   939  	}
   940  	if m.Format != 0 {
   941  		i = encodeVarintTypes(dAtA, i, uint64(m.Format))
   942  		i--
   943  		dAtA[i] = 0x10
   944  	}
   945  	if m.Height != 0 {
   946  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
   947  		i--
   948  		dAtA[i] = 0x8
   949  	}
   950  	return len(dAtA) - i, nil
   951  }
   952  
   953  func (m *ChunkRequest) Marshal() (dAtA []byte, err error) {
   954  	size := m.Size()
   955  	dAtA = make([]byte, size)
   956  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   957  	if err != nil {
   958  		return nil, err
   959  	}
   960  	return dAtA[:n], nil
   961  }
   962  
   963  func (m *ChunkRequest) MarshalTo(dAtA []byte) (int, error) {
   964  	size := m.Size()
   965  	return m.MarshalToSizedBuffer(dAtA[:size])
   966  }
   967  
   968  func (m *ChunkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   969  	i := len(dAtA)
   970  	_ = i
   971  	var l int
   972  	_ = l
   973  	if m.Index != 0 {
   974  		i = encodeVarintTypes(dAtA, i, uint64(m.Index))
   975  		i--
   976  		dAtA[i] = 0x18
   977  	}
   978  	if m.Format != 0 {
   979  		i = encodeVarintTypes(dAtA, i, uint64(m.Format))
   980  		i--
   981  		dAtA[i] = 0x10
   982  	}
   983  	if m.Height != 0 {
   984  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
   985  		i--
   986  		dAtA[i] = 0x8
   987  	}
   988  	return len(dAtA) - i, nil
   989  }
   990  
   991  func (m *ChunkResponse) Marshal() (dAtA []byte, err error) {
   992  	size := m.Size()
   993  	dAtA = make([]byte, size)
   994  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   995  	if err != nil {
   996  		return nil, err
   997  	}
   998  	return dAtA[:n], nil
   999  }
  1000  
  1001  func (m *ChunkResponse) MarshalTo(dAtA []byte) (int, error) {
  1002  	size := m.Size()
  1003  	return m.MarshalToSizedBuffer(dAtA[:size])
  1004  }
  1005  
  1006  func (m *ChunkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1007  	i := len(dAtA)
  1008  	_ = i
  1009  	var l int
  1010  	_ = l
  1011  	if m.Missing {
  1012  		i--
  1013  		if m.Missing {
  1014  			dAtA[i] = 1
  1015  		} else {
  1016  			dAtA[i] = 0
  1017  		}
  1018  		i--
  1019  		dAtA[i] = 0x28
  1020  	}
  1021  	if len(m.Chunk) > 0 {
  1022  		i -= len(m.Chunk)
  1023  		copy(dAtA[i:], m.Chunk)
  1024  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Chunk)))
  1025  		i--
  1026  		dAtA[i] = 0x22
  1027  	}
  1028  	if m.Index != 0 {
  1029  		i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  1030  		i--
  1031  		dAtA[i] = 0x18
  1032  	}
  1033  	if m.Format != 0 {
  1034  		i = encodeVarintTypes(dAtA, i, uint64(m.Format))
  1035  		i--
  1036  		dAtA[i] = 0x10
  1037  	}
  1038  	if m.Height != 0 {
  1039  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  1040  		i--
  1041  		dAtA[i] = 0x8
  1042  	}
  1043  	return len(dAtA) - i, nil
  1044  }
  1045  
  1046  func (m *LightBlockRequest) Marshal() (dAtA []byte, err error) {
  1047  	size := m.Size()
  1048  	dAtA = make([]byte, size)
  1049  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1050  	if err != nil {
  1051  		return nil, err
  1052  	}
  1053  	return dAtA[:n], nil
  1054  }
  1055  
  1056  func (m *LightBlockRequest) MarshalTo(dAtA []byte) (int, error) {
  1057  	size := m.Size()
  1058  	return m.MarshalToSizedBuffer(dAtA[:size])
  1059  }
  1060  
  1061  func (m *LightBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1062  	i := len(dAtA)
  1063  	_ = i
  1064  	var l int
  1065  	_ = l
  1066  	if m.Height != 0 {
  1067  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  1068  		i--
  1069  		dAtA[i] = 0x8
  1070  	}
  1071  	return len(dAtA) - i, nil
  1072  }
  1073  
  1074  func (m *LightBlockResponse) Marshal() (dAtA []byte, err error) {
  1075  	size := m.Size()
  1076  	dAtA = make([]byte, size)
  1077  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1078  	if err != nil {
  1079  		return nil, err
  1080  	}
  1081  	return dAtA[:n], nil
  1082  }
  1083  
  1084  func (m *LightBlockResponse) MarshalTo(dAtA []byte) (int, error) {
  1085  	size := m.Size()
  1086  	return m.MarshalToSizedBuffer(dAtA[:size])
  1087  }
  1088  
  1089  func (m *LightBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1090  	i := len(dAtA)
  1091  	_ = i
  1092  	var l int
  1093  	_ = l
  1094  	if m.LightBlock != nil {
  1095  		{
  1096  			size, err := m.LightBlock.MarshalToSizedBuffer(dAtA[:i])
  1097  			if err != nil {
  1098  				return 0, err
  1099  			}
  1100  			i -= size
  1101  			i = encodeVarintTypes(dAtA, i, uint64(size))
  1102  		}
  1103  		i--
  1104  		dAtA[i] = 0xa
  1105  	}
  1106  	return len(dAtA) - i, nil
  1107  }
  1108  
  1109  func (m *ParamsRequest) Marshal() (dAtA []byte, err error) {
  1110  	size := m.Size()
  1111  	dAtA = make([]byte, size)
  1112  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1113  	if err != nil {
  1114  		return nil, err
  1115  	}
  1116  	return dAtA[:n], nil
  1117  }
  1118  
  1119  func (m *ParamsRequest) MarshalTo(dAtA []byte) (int, error) {
  1120  	size := m.Size()
  1121  	return m.MarshalToSizedBuffer(dAtA[:size])
  1122  }
  1123  
  1124  func (m *ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1125  	i := len(dAtA)
  1126  	_ = i
  1127  	var l int
  1128  	_ = l
  1129  	if m.Height != 0 {
  1130  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  1131  		i--
  1132  		dAtA[i] = 0x8
  1133  	}
  1134  	return len(dAtA) - i, nil
  1135  }
  1136  
  1137  func (m *ParamsResponse) Marshal() (dAtA []byte, err error) {
  1138  	size := m.Size()
  1139  	dAtA = make([]byte, size)
  1140  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1141  	if err != nil {
  1142  		return nil, err
  1143  	}
  1144  	return dAtA[:n], nil
  1145  }
  1146  
  1147  func (m *ParamsResponse) MarshalTo(dAtA []byte) (int, error) {
  1148  	size := m.Size()
  1149  	return m.MarshalToSizedBuffer(dAtA[:size])
  1150  }
  1151  
  1152  func (m *ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1153  	i := len(dAtA)
  1154  	_ = i
  1155  	var l int
  1156  	_ = l
  1157  	{
  1158  		size, err := m.ConsensusParams.MarshalToSizedBuffer(dAtA[:i])
  1159  		if err != nil {
  1160  			return 0, err
  1161  		}
  1162  		i -= size
  1163  		i = encodeVarintTypes(dAtA, i, uint64(size))
  1164  	}
  1165  	i--
  1166  	dAtA[i] = 0x12
  1167  	if m.Height != 0 {
  1168  		i = encodeVarintTypes(dAtA, i, uint64(m.Height))
  1169  		i--
  1170  		dAtA[i] = 0x8
  1171  	}
  1172  	return len(dAtA) - i, nil
  1173  }
  1174  
  1175  func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  1176  	offset -= sovTypes(v)
  1177  	base := offset
  1178  	for v >= 1<<7 {
  1179  		dAtA[offset] = uint8(v&0x7f | 0x80)
  1180  		v >>= 7
  1181  		offset++
  1182  	}
  1183  	dAtA[offset] = uint8(v)
  1184  	return base
  1185  }
  1186  func (m *Message) Size() (n int) {
  1187  	if m == nil {
  1188  		return 0
  1189  	}
  1190  	var l int
  1191  	_ = l
  1192  	if m.Sum != nil {
  1193  		n += m.Sum.Size()
  1194  	}
  1195  	return n
  1196  }
  1197  
  1198  func (m *Message_SnapshotsRequest) Size() (n int) {
  1199  	if m == nil {
  1200  		return 0
  1201  	}
  1202  	var l int
  1203  	_ = l
  1204  	if m.SnapshotsRequest != nil {
  1205  		l = m.SnapshotsRequest.Size()
  1206  		n += 1 + l + sovTypes(uint64(l))
  1207  	}
  1208  	return n
  1209  }
  1210  func (m *Message_SnapshotsResponse) Size() (n int) {
  1211  	if m == nil {
  1212  		return 0
  1213  	}
  1214  	var l int
  1215  	_ = l
  1216  	if m.SnapshotsResponse != nil {
  1217  		l = m.SnapshotsResponse.Size()
  1218  		n += 1 + l + sovTypes(uint64(l))
  1219  	}
  1220  	return n
  1221  }
  1222  func (m *Message_ChunkRequest) Size() (n int) {
  1223  	if m == nil {
  1224  		return 0
  1225  	}
  1226  	var l int
  1227  	_ = l
  1228  	if m.ChunkRequest != nil {
  1229  		l = m.ChunkRequest.Size()
  1230  		n += 1 + l + sovTypes(uint64(l))
  1231  	}
  1232  	return n
  1233  }
  1234  func (m *Message_ChunkResponse) Size() (n int) {
  1235  	if m == nil {
  1236  		return 0
  1237  	}
  1238  	var l int
  1239  	_ = l
  1240  	if m.ChunkResponse != nil {
  1241  		l = m.ChunkResponse.Size()
  1242  		n += 1 + l + sovTypes(uint64(l))
  1243  	}
  1244  	return n
  1245  }
  1246  func (m *Message_LightBlockRequest) Size() (n int) {
  1247  	if m == nil {
  1248  		return 0
  1249  	}
  1250  	var l int
  1251  	_ = l
  1252  	if m.LightBlockRequest != nil {
  1253  		l = m.LightBlockRequest.Size()
  1254  		n += 1 + l + sovTypes(uint64(l))
  1255  	}
  1256  	return n
  1257  }
  1258  func (m *Message_LightBlockResponse) Size() (n int) {
  1259  	if m == nil {
  1260  		return 0
  1261  	}
  1262  	var l int
  1263  	_ = l
  1264  	if m.LightBlockResponse != nil {
  1265  		l = m.LightBlockResponse.Size()
  1266  		n += 1 + l + sovTypes(uint64(l))
  1267  	}
  1268  	return n
  1269  }
  1270  func (m *Message_ParamsRequest) Size() (n int) {
  1271  	if m == nil {
  1272  		return 0
  1273  	}
  1274  	var l int
  1275  	_ = l
  1276  	if m.ParamsRequest != nil {
  1277  		l = m.ParamsRequest.Size()
  1278  		n += 1 + l + sovTypes(uint64(l))
  1279  	}
  1280  	return n
  1281  }
  1282  func (m *Message_ParamsResponse) Size() (n int) {
  1283  	if m == nil {
  1284  		return 0
  1285  	}
  1286  	var l int
  1287  	_ = l
  1288  	if m.ParamsResponse != nil {
  1289  		l = m.ParamsResponse.Size()
  1290  		n += 1 + l + sovTypes(uint64(l))
  1291  	}
  1292  	return n
  1293  }
  1294  func (m *SnapshotsRequest) Size() (n int) {
  1295  	if m == nil {
  1296  		return 0
  1297  	}
  1298  	var l int
  1299  	_ = l
  1300  	return n
  1301  }
  1302  
  1303  func (m *SnapshotsResponse) Size() (n int) {
  1304  	if m == nil {
  1305  		return 0
  1306  	}
  1307  	var l int
  1308  	_ = l
  1309  	if m.Height != 0 {
  1310  		n += 1 + sovTypes(uint64(m.Height))
  1311  	}
  1312  	if m.Format != 0 {
  1313  		n += 1 + sovTypes(uint64(m.Format))
  1314  	}
  1315  	if m.Chunks != 0 {
  1316  		n += 1 + sovTypes(uint64(m.Chunks))
  1317  	}
  1318  	l = len(m.Hash)
  1319  	if l > 0 {
  1320  		n += 1 + l + sovTypes(uint64(l))
  1321  	}
  1322  	l = len(m.Metadata)
  1323  	if l > 0 {
  1324  		n += 1 + l + sovTypes(uint64(l))
  1325  	}
  1326  	return n
  1327  }
  1328  
  1329  func (m *ChunkRequest) Size() (n int) {
  1330  	if m == nil {
  1331  		return 0
  1332  	}
  1333  	var l int
  1334  	_ = l
  1335  	if m.Height != 0 {
  1336  		n += 1 + sovTypes(uint64(m.Height))
  1337  	}
  1338  	if m.Format != 0 {
  1339  		n += 1 + sovTypes(uint64(m.Format))
  1340  	}
  1341  	if m.Index != 0 {
  1342  		n += 1 + sovTypes(uint64(m.Index))
  1343  	}
  1344  	return n
  1345  }
  1346  
  1347  func (m *ChunkResponse) Size() (n int) {
  1348  	if m == nil {
  1349  		return 0
  1350  	}
  1351  	var l int
  1352  	_ = l
  1353  	if m.Height != 0 {
  1354  		n += 1 + sovTypes(uint64(m.Height))
  1355  	}
  1356  	if m.Format != 0 {
  1357  		n += 1 + sovTypes(uint64(m.Format))
  1358  	}
  1359  	if m.Index != 0 {
  1360  		n += 1 + sovTypes(uint64(m.Index))
  1361  	}
  1362  	l = len(m.Chunk)
  1363  	if l > 0 {
  1364  		n += 1 + l + sovTypes(uint64(l))
  1365  	}
  1366  	if m.Missing {
  1367  		n += 2
  1368  	}
  1369  	return n
  1370  }
  1371  
  1372  func (m *LightBlockRequest) Size() (n int) {
  1373  	if m == nil {
  1374  		return 0
  1375  	}
  1376  	var l int
  1377  	_ = l
  1378  	if m.Height != 0 {
  1379  		n += 1 + sovTypes(uint64(m.Height))
  1380  	}
  1381  	return n
  1382  }
  1383  
  1384  func (m *LightBlockResponse) Size() (n int) {
  1385  	if m == nil {
  1386  		return 0
  1387  	}
  1388  	var l int
  1389  	_ = l
  1390  	if m.LightBlock != nil {
  1391  		l = m.LightBlock.Size()
  1392  		n += 1 + l + sovTypes(uint64(l))
  1393  	}
  1394  	return n
  1395  }
  1396  
  1397  func (m *ParamsRequest) Size() (n int) {
  1398  	if m == nil {
  1399  		return 0
  1400  	}
  1401  	var l int
  1402  	_ = l
  1403  	if m.Height != 0 {
  1404  		n += 1 + sovTypes(uint64(m.Height))
  1405  	}
  1406  	return n
  1407  }
  1408  
  1409  func (m *ParamsResponse) Size() (n int) {
  1410  	if m == nil {
  1411  		return 0
  1412  	}
  1413  	var l int
  1414  	_ = l
  1415  	if m.Height != 0 {
  1416  		n += 1 + sovTypes(uint64(m.Height))
  1417  	}
  1418  	l = m.ConsensusParams.Size()
  1419  	n += 1 + l + sovTypes(uint64(l))
  1420  	return n
  1421  }
  1422  
  1423  func sovTypes(x uint64) (n int) {
  1424  	return (math_bits.Len64(x|1) + 6) / 7
  1425  }
  1426  func sozTypes(x uint64) (n int) {
  1427  	return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1428  }
  1429  func (m *Message) Unmarshal(dAtA []byte) error {
  1430  	l := len(dAtA)
  1431  	iNdEx := 0
  1432  	for iNdEx < l {
  1433  		preIndex := iNdEx
  1434  		var wire uint64
  1435  		for shift := uint(0); ; shift += 7 {
  1436  			if shift >= 64 {
  1437  				return ErrIntOverflowTypes
  1438  			}
  1439  			if iNdEx >= l {
  1440  				return io.ErrUnexpectedEOF
  1441  			}
  1442  			b := dAtA[iNdEx]
  1443  			iNdEx++
  1444  			wire |= uint64(b&0x7F) << shift
  1445  			if b < 0x80 {
  1446  				break
  1447  			}
  1448  		}
  1449  		fieldNum := int32(wire >> 3)
  1450  		wireType := int(wire & 0x7)
  1451  		if wireType == 4 {
  1452  			return fmt.Errorf("proto: Message: wiretype end group for non-group")
  1453  		}
  1454  		if fieldNum <= 0 {
  1455  			return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire)
  1456  		}
  1457  		switch fieldNum {
  1458  		case 1:
  1459  			if wireType != 2 {
  1460  				return fmt.Errorf("proto: wrong wireType = %d for field SnapshotsRequest", wireType)
  1461  			}
  1462  			var msglen int
  1463  			for shift := uint(0); ; shift += 7 {
  1464  				if shift >= 64 {
  1465  					return ErrIntOverflowTypes
  1466  				}
  1467  				if iNdEx >= l {
  1468  					return io.ErrUnexpectedEOF
  1469  				}
  1470  				b := dAtA[iNdEx]
  1471  				iNdEx++
  1472  				msglen |= int(b&0x7F) << shift
  1473  				if b < 0x80 {
  1474  					break
  1475  				}
  1476  			}
  1477  			if msglen < 0 {
  1478  				return ErrInvalidLengthTypes
  1479  			}
  1480  			postIndex := iNdEx + msglen
  1481  			if postIndex < 0 {
  1482  				return ErrInvalidLengthTypes
  1483  			}
  1484  			if postIndex > l {
  1485  				return io.ErrUnexpectedEOF
  1486  			}
  1487  			v := &SnapshotsRequest{}
  1488  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1489  				return err
  1490  			}
  1491  			m.Sum = &Message_SnapshotsRequest{v}
  1492  			iNdEx = postIndex
  1493  		case 2:
  1494  			if wireType != 2 {
  1495  				return fmt.Errorf("proto: wrong wireType = %d for field SnapshotsResponse", wireType)
  1496  			}
  1497  			var msglen int
  1498  			for shift := uint(0); ; shift += 7 {
  1499  				if shift >= 64 {
  1500  					return ErrIntOverflowTypes
  1501  				}
  1502  				if iNdEx >= l {
  1503  					return io.ErrUnexpectedEOF
  1504  				}
  1505  				b := dAtA[iNdEx]
  1506  				iNdEx++
  1507  				msglen |= int(b&0x7F) << shift
  1508  				if b < 0x80 {
  1509  					break
  1510  				}
  1511  			}
  1512  			if msglen < 0 {
  1513  				return ErrInvalidLengthTypes
  1514  			}
  1515  			postIndex := iNdEx + msglen
  1516  			if postIndex < 0 {
  1517  				return ErrInvalidLengthTypes
  1518  			}
  1519  			if postIndex > l {
  1520  				return io.ErrUnexpectedEOF
  1521  			}
  1522  			v := &SnapshotsResponse{}
  1523  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1524  				return err
  1525  			}
  1526  			m.Sum = &Message_SnapshotsResponse{v}
  1527  			iNdEx = postIndex
  1528  		case 3:
  1529  			if wireType != 2 {
  1530  				return fmt.Errorf("proto: wrong wireType = %d for field ChunkRequest", wireType)
  1531  			}
  1532  			var msglen int
  1533  			for shift := uint(0); ; shift += 7 {
  1534  				if shift >= 64 {
  1535  					return ErrIntOverflowTypes
  1536  				}
  1537  				if iNdEx >= l {
  1538  					return io.ErrUnexpectedEOF
  1539  				}
  1540  				b := dAtA[iNdEx]
  1541  				iNdEx++
  1542  				msglen |= int(b&0x7F) << shift
  1543  				if b < 0x80 {
  1544  					break
  1545  				}
  1546  			}
  1547  			if msglen < 0 {
  1548  				return ErrInvalidLengthTypes
  1549  			}
  1550  			postIndex := iNdEx + msglen
  1551  			if postIndex < 0 {
  1552  				return ErrInvalidLengthTypes
  1553  			}
  1554  			if postIndex > l {
  1555  				return io.ErrUnexpectedEOF
  1556  			}
  1557  			v := &ChunkRequest{}
  1558  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1559  				return err
  1560  			}
  1561  			m.Sum = &Message_ChunkRequest{v}
  1562  			iNdEx = postIndex
  1563  		case 4:
  1564  			if wireType != 2 {
  1565  				return fmt.Errorf("proto: wrong wireType = %d for field ChunkResponse", wireType)
  1566  			}
  1567  			var msglen int
  1568  			for shift := uint(0); ; shift += 7 {
  1569  				if shift >= 64 {
  1570  					return ErrIntOverflowTypes
  1571  				}
  1572  				if iNdEx >= l {
  1573  					return io.ErrUnexpectedEOF
  1574  				}
  1575  				b := dAtA[iNdEx]
  1576  				iNdEx++
  1577  				msglen |= int(b&0x7F) << shift
  1578  				if b < 0x80 {
  1579  					break
  1580  				}
  1581  			}
  1582  			if msglen < 0 {
  1583  				return ErrInvalidLengthTypes
  1584  			}
  1585  			postIndex := iNdEx + msglen
  1586  			if postIndex < 0 {
  1587  				return ErrInvalidLengthTypes
  1588  			}
  1589  			if postIndex > l {
  1590  				return io.ErrUnexpectedEOF
  1591  			}
  1592  			v := &ChunkResponse{}
  1593  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1594  				return err
  1595  			}
  1596  			m.Sum = &Message_ChunkResponse{v}
  1597  			iNdEx = postIndex
  1598  		case 5:
  1599  			if wireType != 2 {
  1600  				return fmt.Errorf("proto: wrong wireType = %d for field LightBlockRequest", wireType)
  1601  			}
  1602  			var msglen int
  1603  			for shift := uint(0); ; shift += 7 {
  1604  				if shift >= 64 {
  1605  					return ErrIntOverflowTypes
  1606  				}
  1607  				if iNdEx >= l {
  1608  					return io.ErrUnexpectedEOF
  1609  				}
  1610  				b := dAtA[iNdEx]
  1611  				iNdEx++
  1612  				msglen |= int(b&0x7F) << shift
  1613  				if b < 0x80 {
  1614  					break
  1615  				}
  1616  			}
  1617  			if msglen < 0 {
  1618  				return ErrInvalidLengthTypes
  1619  			}
  1620  			postIndex := iNdEx + msglen
  1621  			if postIndex < 0 {
  1622  				return ErrInvalidLengthTypes
  1623  			}
  1624  			if postIndex > l {
  1625  				return io.ErrUnexpectedEOF
  1626  			}
  1627  			v := &LightBlockRequest{}
  1628  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1629  				return err
  1630  			}
  1631  			m.Sum = &Message_LightBlockRequest{v}
  1632  			iNdEx = postIndex
  1633  		case 6:
  1634  			if wireType != 2 {
  1635  				return fmt.Errorf("proto: wrong wireType = %d for field LightBlockResponse", wireType)
  1636  			}
  1637  			var msglen int
  1638  			for shift := uint(0); ; shift += 7 {
  1639  				if shift >= 64 {
  1640  					return ErrIntOverflowTypes
  1641  				}
  1642  				if iNdEx >= l {
  1643  					return io.ErrUnexpectedEOF
  1644  				}
  1645  				b := dAtA[iNdEx]
  1646  				iNdEx++
  1647  				msglen |= int(b&0x7F) << shift
  1648  				if b < 0x80 {
  1649  					break
  1650  				}
  1651  			}
  1652  			if msglen < 0 {
  1653  				return ErrInvalidLengthTypes
  1654  			}
  1655  			postIndex := iNdEx + msglen
  1656  			if postIndex < 0 {
  1657  				return ErrInvalidLengthTypes
  1658  			}
  1659  			if postIndex > l {
  1660  				return io.ErrUnexpectedEOF
  1661  			}
  1662  			v := &LightBlockResponse{}
  1663  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1664  				return err
  1665  			}
  1666  			m.Sum = &Message_LightBlockResponse{v}
  1667  			iNdEx = postIndex
  1668  		case 7:
  1669  			if wireType != 2 {
  1670  				return fmt.Errorf("proto: wrong wireType = %d for field ParamsRequest", wireType)
  1671  			}
  1672  			var msglen int
  1673  			for shift := uint(0); ; shift += 7 {
  1674  				if shift >= 64 {
  1675  					return ErrIntOverflowTypes
  1676  				}
  1677  				if iNdEx >= l {
  1678  					return io.ErrUnexpectedEOF
  1679  				}
  1680  				b := dAtA[iNdEx]
  1681  				iNdEx++
  1682  				msglen |= int(b&0x7F) << shift
  1683  				if b < 0x80 {
  1684  					break
  1685  				}
  1686  			}
  1687  			if msglen < 0 {
  1688  				return ErrInvalidLengthTypes
  1689  			}
  1690  			postIndex := iNdEx + msglen
  1691  			if postIndex < 0 {
  1692  				return ErrInvalidLengthTypes
  1693  			}
  1694  			if postIndex > l {
  1695  				return io.ErrUnexpectedEOF
  1696  			}
  1697  			v := &ParamsRequest{}
  1698  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1699  				return err
  1700  			}
  1701  			m.Sum = &Message_ParamsRequest{v}
  1702  			iNdEx = postIndex
  1703  		case 8:
  1704  			if wireType != 2 {
  1705  				return fmt.Errorf("proto: wrong wireType = %d for field ParamsResponse", wireType)
  1706  			}
  1707  			var msglen int
  1708  			for shift := uint(0); ; shift += 7 {
  1709  				if shift >= 64 {
  1710  					return ErrIntOverflowTypes
  1711  				}
  1712  				if iNdEx >= l {
  1713  					return io.ErrUnexpectedEOF
  1714  				}
  1715  				b := dAtA[iNdEx]
  1716  				iNdEx++
  1717  				msglen |= int(b&0x7F) << shift
  1718  				if b < 0x80 {
  1719  					break
  1720  				}
  1721  			}
  1722  			if msglen < 0 {
  1723  				return ErrInvalidLengthTypes
  1724  			}
  1725  			postIndex := iNdEx + msglen
  1726  			if postIndex < 0 {
  1727  				return ErrInvalidLengthTypes
  1728  			}
  1729  			if postIndex > l {
  1730  				return io.ErrUnexpectedEOF
  1731  			}
  1732  			v := &ParamsResponse{}
  1733  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1734  				return err
  1735  			}
  1736  			m.Sum = &Message_ParamsResponse{v}
  1737  			iNdEx = postIndex
  1738  		default:
  1739  			iNdEx = preIndex
  1740  			skippy, err := skipTypes(dAtA[iNdEx:])
  1741  			if err != nil {
  1742  				return err
  1743  			}
  1744  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1745  				return ErrInvalidLengthTypes
  1746  			}
  1747  			if (iNdEx + skippy) > l {
  1748  				return io.ErrUnexpectedEOF
  1749  			}
  1750  			iNdEx += skippy
  1751  		}
  1752  	}
  1753  
  1754  	if iNdEx > l {
  1755  		return io.ErrUnexpectedEOF
  1756  	}
  1757  	return nil
  1758  }
  1759  func (m *SnapshotsRequest) Unmarshal(dAtA []byte) error {
  1760  	l := len(dAtA)
  1761  	iNdEx := 0
  1762  	for iNdEx < l {
  1763  		preIndex := iNdEx
  1764  		var wire uint64
  1765  		for shift := uint(0); ; shift += 7 {
  1766  			if shift >= 64 {
  1767  				return ErrIntOverflowTypes
  1768  			}
  1769  			if iNdEx >= l {
  1770  				return io.ErrUnexpectedEOF
  1771  			}
  1772  			b := dAtA[iNdEx]
  1773  			iNdEx++
  1774  			wire |= uint64(b&0x7F) << shift
  1775  			if b < 0x80 {
  1776  				break
  1777  			}
  1778  		}
  1779  		fieldNum := int32(wire >> 3)
  1780  		wireType := int(wire & 0x7)
  1781  		if wireType == 4 {
  1782  			return fmt.Errorf("proto: SnapshotsRequest: wiretype end group for non-group")
  1783  		}
  1784  		if fieldNum <= 0 {
  1785  			return fmt.Errorf("proto: SnapshotsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1786  		}
  1787  		switch fieldNum {
  1788  		default:
  1789  			iNdEx = preIndex
  1790  			skippy, err := skipTypes(dAtA[iNdEx:])
  1791  			if err != nil {
  1792  				return err
  1793  			}
  1794  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1795  				return ErrInvalidLengthTypes
  1796  			}
  1797  			if (iNdEx + skippy) > l {
  1798  				return io.ErrUnexpectedEOF
  1799  			}
  1800  			iNdEx += skippy
  1801  		}
  1802  	}
  1803  
  1804  	if iNdEx > l {
  1805  		return io.ErrUnexpectedEOF
  1806  	}
  1807  	return nil
  1808  }
  1809  func (m *SnapshotsResponse) Unmarshal(dAtA []byte) error {
  1810  	l := len(dAtA)
  1811  	iNdEx := 0
  1812  	for iNdEx < l {
  1813  		preIndex := iNdEx
  1814  		var wire uint64
  1815  		for shift := uint(0); ; shift += 7 {
  1816  			if shift >= 64 {
  1817  				return ErrIntOverflowTypes
  1818  			}
  1819  			if iNdEx >= l {
  1820  				return io.ErrUnexpectedEOF
  1821  			}
  1822  			b := dAtA[iNdEx]
  1823  			iNdEx++
  1824  			wire |= uint64(b&0x7F) << shift
  1825  			if b < 0x80 {
  1826  				break
  1827  			}
  1828  		}
  1829  		fieldNum := int32(wire >> 3)
  1830  		wireType := int(wire & 0x7)
  1831  		if wireType == 4 {
  1832  			return fmt.Errorf("proto: SnapshotsResponse: wiretype end group for non-group")
  1833  		}
  1834  		if fieldNum <= 0 {
  1835  			return fmt.Errorf("proto: SnapshotsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1836  		}
  1837  		switch fieldNum {
  1838  		case 1:
  1839  			if wireType != 0 {
  1840  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  1841  			}
  1842  			m.Height = 0
  1843  			for shift := uint(0); ; shift += 7 {
  1844  				if shift >= 64 {
  1845  					return ErrIntOverflowTypes
  1846  				}
  1847  				if iNdEx >= l {
  1848  					return io.ErrUnexpectedEOF
  1849  				}
  1850  				b := dAtA[iNdEx]
  1851  				iNdEx++
  1852  				m.Height |= uint64(b&0x7F) << shift
  1853  				if b < 0x80 {
  1854  					break
  1855  				}
  1856  			}
  1857  		case 2:
  1858  			if wireType != 0 {
  1859  				return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  1860  			}
  1861  			m.Format = 0
  1862  			for shift := uint(0); ; shift += 7 {
  1863  				if shift >= 64 {
  1864  					return ErrIntOverflowTypes
  1865  				}
  1866  				if iNdEx >= l {
  1867  					return io.ErrUnexpectedEOF
  1868  				}
  1869  				b := dAtA[iNdEx]
  1870  				iNdEx++
  1871  				m.Format |= uint32(b&0x7F) << shift
  1872  				if b < 0x80 {
  1873  					break
  1874  				}
  1875  			}
  1876  		case 3:
  1877  			if wireType != 0 {
  1878  				return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType)
  1879  			}
  1880  			m.Chunks = 0
  1881  			for shift := uint(0); ; shift += 7 {
  1882  				if shift >= 64 {
  1883  					return ErrIntOverflowTypes
  1884  				}
  1885  				if iNdEx >= l {
  1886  					return io.ErrUnexpectedEOF
  1887  				}
  1888  				b := dAtA[iNdEx]
  1889  				iNdEx++
  1890  				m.Chunks |= uint32(b&0x7F) << shift
  1891  				if b < 0x80 {
  1892  					break
  1893  				}
  1894  			}
  1895  		case 4:
  1896  			if wireType != 2 {
  1897  				return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  1898  			}
  1899  			var byteLen int
  1900  			for shift := uint(0); ; shift += 7 {
  1901  				if shift >= 64 {
  1902  					return ErrIntOverflowTypes
  1903  				}
  1904  				if iNdEx >= l {
  1905  					return io.ErrUnexpectedEOF
  1906  				}
  1907  				b := dAtA[iNdEx]
  1908  				iNdEx++
  1909  				byteLen |= int(b&0x7F) << shift
  1910  				if b < 0x80 {
  1911  					break
  1912  				}
  1913  			}
  1914  			if byteLen < 0 {
  1915  				return ErrInvalidLengthTypes
  1916  			}
  1917  			postIndex := iNdEx + byteLen
  1918  			if postIndex < 0 {
  1919  				return ErrInvalidLengthTypes
  1920  			}
  1921  			if postIndex > l {
  1922  				return io.ErrUnexpectedEOF
  1923  			}
  1924  			m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  1925  			if m.Hash == nil {
  1926  				m.Hash = []byte{}
  1927  			}
  1928  			iNdEx = postIndex
  1929  		case 5:
  1930  			if wireType != 2 {
  1931  				return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
  1932  			}
  1933  			var byteLen int
  1934  			for shift := uint(0); ; shift += 7 {
  1935  				if shift >= 64 {
  1936  					return ErrIntOverflowTypes
  1937  				}
  1938  				if iNdEx >= l {
  1939  					return io.ErrUnexpectedEOF
  1940  				}
  1941  				b := dAtA[iNdEx]
  1942  				iNdEx++
  1943  				byteLen |= int(b&0x7F) << shift
  1944  				if b < 0x80 {
  1945  					break
  1946  				}
  1947  			}
  1948  			if byteLen < 0 {
  1949  				return ErrInvalidLengthTypes
  1950  			}
  1951  			postIndex := iNdEx + byteLen
  1952  			if postIndex < 0 {
  1953  				return ErrInvalidLengthTypes
  1954  			}
  1955  			if postIndex > l {
  1956  				return io.ErrUnexpectedEOF
  1957  			}
  1958  			m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...)
  1959  			if m.Metadata == nil {
  1960  				m.Metadata = []byte{}
  1961  			}
  1962  			iNdEx = postIndex
  1963  		default:
  1964  			iNdEx = preIndex
  1965  			skippy, err := skipTypes(dAtA[iNdEx:])
  1966  			if err != nil {
  1967  				return err
  1968  			}
  1969  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1970  				return ErrInvalidLengthTypes
  1971  			}
  1972  			if (iNdEx + skippy) > l {
  1973  				return io.ErrUnexpectedEOF
  1974  			}
  1975  			iNdEx += skippy
  1976  		}
  1977  	}
  1978  
  1979  	if iNdEx > l {
  1980  		return io.ErrUnexpectedEOF
  1981  	}
  1982  	return nil
  1983  }
  1984  func (m *ChunkRequest) Unmarshal(dAtA []byte) error {
  1985  	l := len(dAtA)
  1986  	iNdEx := 0
  1987  	for iNdEx < l {
  1988  		preIndex := iNdEx
  1989  		var wire uint64
  1990  		for shift := uint(0); ; shift += 7 {
  1991  			if shift >= 64 {
  1992  				return ErrIntOverflowTypes
  1993  			}
  1994  			if iNdEx >= l {
  1995  				return io.ErrUnexpectedEOF
  1996  			}
  1997  			b := dAtA[iNdEx]
  1998  			iNdEx++
  1999  			wire |= uint64(b&0x7F) << shift
  2000  			if b < 0x80 {
  2001  				break
  2002  			}
  2003  		}
  2004  		fieldNum := int32(wire >> 3)
  2005  		wireType := int(wire & 0x7)
  2006  		if wireType == 4 {
  2007  			return fmt.Errorf("proto: ChunkRequest: wiretype end group for non-group")
  2008  		}
  2009  		if fieldNum <= 0 {
  2010  			return fmt.Errorf("proto: ChunkRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  2011  		}
  2012  		switch fieldNum {
  2013  		case 1:
  2014  			if wireType != 0 {
  2015  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  2016  			}
  2017  			m.Height = 0
  2018  			for shift := uint(0); ; shift += 7 {
  2019  				if shift >= 64 {
  2020  					return ErrIntOverflowTypes
  2021  				}
  2022  				if iNdEx >= l {
  2023  					return io.ErrUnexpectedEOF
  2024  				}
  2025  				b := dAtA[iNdEx]
  2026  				iNdEx++
  2027  				m.Height |= uint64(b&0x7F) << shift
  2028  				if b < 0x80 {
  2029  					break
  2030  				}
  2031  			}
  2032  		case 2:
  2033  			if wireType != 0 {
  2034  				return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  2035  			}
  2036  			m.Format = 0
  2037  			for shift := uint(0); ; shift += 7 {
  2038  				if shift >= 64 {
  2039  					return ErrIntOverflowTypes
  2040  				}
  2041  				if iNdEx >= l {
  2042  					return io.ErrUnexpectedEOF
  2043  				}
  2044  				b := dAtA[iNdEx]
  2045  				iNdEx++
  2046  				m.Format |= uint32(b&0x7F) << shift
  2047  				if b < 0x80 {
  2048  					break
  2049  				}
  2050  			}
  2051  		case 3:
  2052  			if wireType != 0 {
  2053  				return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  2054  			}
  2055  			m.Index = 0
  2056  			for shift := uint(0); ; shift += 7 {
  2057  				if shift >= 64 {
  2058  					return ErrIntOverflowTypes
  2059  				}
  2060  				if iNdEx >= l {
  2061  					return io.ErrUnexpectedEOF
  2062  				}
  2063  				b := dAtA[iNdEx]
  2064  				iNdEx++
  2065  				m.Index |= uint32(b&0x7F) << shift
  2066  				if b < 0x80 {
  2067  					break
  2068  				}
  2069  			}
  2070  		default:
  2071  			iNdEx = preIndex
  2072  			skippy, err := skipTypes(dAtA[iNdEx:])
  2073  			if err != nil {
  2074  				return err
  2075  			}
  2076  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2077  				return ErrInvalidLengthTypes
  2078  			}
  2079  			if (iNdEx + skippy) > l {
  2080  				return io.ErrUnexpectedEOF
  2081  			}
  2082  			iNdEx += skippy
  2083  		}
  2084  	}
  2085  
  2086  	if iNdEx > l {
  2087  		return io.ErrUnexpectedEOF
  2088  	}
  2089  	return nil
  2090  }
  2091  func (m *ChunkResponse) Unmarshal(dAtA []byte) error {
  2092  	l := len(dAtA)
  2093  	iNdEx := 0
  2094  	for iNdEx < l {
  2095  		preIndex := iNdEx
  2096  		var wire uint64
  2097  		for shift := uint(0); ; shift += 7 {
  2098  			if shift >= 64 {
  2099  				return ErrIntOverflowTypes
  2100  			}
  2101  			if iNdEx >= l {
  2102  				return io.ErrUnexpectedEOF
  2103  			}
  2104  			b := dAtA[iNdEx]
  2105  			iNdEx++
  2106  			wire |= uint64(b&0x7F) << shift
  2107  			if b < 0x80 {
  2108  				break
  2109  			}
  2110  		}
  2111  		fieldNum := int32(wire >> 3)
  2112  		wireType := int(wire & 0x7)
  2113  		if wireType == 4 {
  2114  			return fmt.Errorf("proto: ChunkResponse: wiretype end group for non-group")
  2115  		}
  2116  		if fieldNum <= 0 {
  2117  			return fmt.Errorf("proto: ChunkResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  2118  		}
  2119  		switch fieldNum {
  2120  		case 1:
  2121  			if wireType != 0 {
  2122  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  2123  			}
  2124  			m.Height = 0
  2125  			for shift := uint(0); ; shift += 7 {
  2126  				if shift >= 64 {
  2127  					return ErrIntOverflowTypes
  2128  				}
  2129  				if iNdEx >= l {
  2130  					return io.ErrUnexpectedEOF
  2131  				}
  2132  				b := dAtA[iNdEx]
  2133  				iNdEx++
  2134  				m.Height |= uint64(b&0x7F) << shift
  2135  				if b < 0x80 {
  2136  					break
  2137  				}
  2138  			}
  2139  		case 2:
  2140  			if wireType != 0 {
  2141  				return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType)
  2142  			}
  2143  			m.Format = 0
  2144  			for shift := uint(0); ; shift += 7 {
  2145  				if shift >= 64 {
  2146  					return ErrIntOverflowTypes
  2147  				}
  2148  				if iNdEx >= l {
  2149  					return io.ErrUnexpectedEOF
  2150  				}
  2151  				b := dAtA[iNdEx]
  2152  				iNdEx++
  2153  				m.Format |= uint32(b&0x7F) << shift
  2154  				if b < 0x80 {
  2155  					break
  2156  				}
  2157  			}
  2158  		case 3:
  2159  			if wireType != 0 {
  2160  				return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  2161  			}
  2162  			m.Index = 0
  2163  			for shift := uint(0); ; shift += 7 {
  2164  				if shift >= 64 {
  2165  					return ErrIntOverflowTypes
  2166  				}
  2167  				if iNdEx >= l {
  2168  					return io.ErrUnexpectedEOF
  2169  				}
  2170  				b := dAtA[iNdEx]
  2171  				iNdEx++
  2172  				m.Index |= uint32(b&0x7F) << shift
  2173  				if b < 0x80 {
  2174  					break
  2175  				}
  2176  			}
  2177  		case 4:
  2178  			if wireType != 2 {
  2179  				return fmt.Errorf("proto: wrong wireType = %d for field Chunk", wireType)
  2180  			}
  2181  			var byteLen int
  2182  			for shift := uint(0); ; shift += 7 {
  2183  				if shift >= 64 {
  2184  					return ErrIntOverflowTypes
  2185  				}
  2186  				if iNdEx >= l {
  2187  					return io.ErrUnexpectedEOF
  2188  				}
  2189  				b := dAtA[iNdEx]
  2190  				iNdEx++
  2191  				byteLen |= int(b&0x7F) << shift
  2192  				if b < 0x80 {
  2193  					break
  2194  				}
  2195  			}
  2196  			if byteLen < 0 {
  2197  				return ErrInvalidLengthTypes
  2198  			}
  2199  			postIndex := iNdEx + byteLen
  2200  			if postIndex < 0 {
  2201  				return ErrInvalidLengthTypes
  2202  			}
  2203  			if postIndex > l {
  2204  				return io.ErrUnexpectedEOF
  2205  			}
  2206  			m.Chunk = append(m.Chunk[:0], dAtA[iNdEx:postIndex]...)
  2207  			if m.Chunk == nil {
  2208  				m.Chunk = []byte{}
  2209  			}
  2210  			iNdEx = postIndex
  2211  		case 5:
  2212  			if wireType != 0 {
  2213  				return fmt.Errorf("proto: wrong wireType = %d for field Missing", wireType)
  2214  			}
  2215  			var v int
  2216  			for shift := uint(0); ; shift += 7 {
  2217  				if shift >= 64 {
  2218  					return ErrIntOverflowTypes
  2219  				}
  2220  				if iNdEx >= l {
  2221  					return io.ErrUnexpectedEOF
  2222  				}
  2223  				b := dAtA[iNdEx]
  2224  				iNdEx++
  2225  				v |= int(b&0x7F) << shift
  2226  				if b < 0x80 {
  2227  					break
  2228  				}
  2229  			}
  2230  			m.Missing = bool(v != 0)
  2231  		default:
  2232  			iNdEx = preIndex
  2233  			skippy, err := skipTypes(dAtA[iNdEx:])
  2234  			if err != nil {
  2235  				return err
  2236  			}
  2237  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2238  				return ErrInvalidLengthTypes
  2239  			}
  2240  			if (iNdEx + skippy) > l {
  2241  				return io.ErrUnexpectedEOF
  2242  			}
  2243  			iNdEx += skippy
  2244  		}
  2245  	}
  2246  
  2247  	if iNdEx > l {
  2248  		return io.ErrUnexpectedEOF
  2249  	}
  2250  	return nil
  2251  }
  2252  func (m *LightBlockRequest) Unmarshal(dAtA []byte) error {
  2253  	l := len(dAtA)
  2254  	iNdEx := 0
  2255  	for iNdEx < l {
  2256  		preIndex := iNdEx
  2257  		var wire uint64
  2258  		for shift := uint(0); ; shift += 7 {
  2259  			if shift >= 64 {
  2260  				return ErrIntOverflowTypes
  2261  			}
  2262  			if iNdEx >= l {
  2263  				return io.ErrUnexpectedEOF
  2264  			}
  2265  			b := dAtA[iNdEx]
  2266  			iNdEx++
  2267  			wire |= uint64(b&0x7F) << shift
  2268  			if b < 0x80 {
  2269  				break
  2270  			}
  2271  		}
  2272  		fieldNum := int32(wire >> 3)
  2273  		wireType := int(wire & 0x7)
  2274  		if wireType == 4 {
  2275  			return fmt.Errorf("proto: LightBlockRequest: wiretype end group for non-group")
  2276  		}
  2277  		if fieldNum <= 0 {
  2278  			return fmt.Errorf("proto: LightBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  2279  		}
  2280  		switch fieldNum {
  2281  		case 1:
  2282  			if wireType != 0 {
  2283  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  2284  			}
  2285  			m.Height = 0
  2286  			for shift := uint(0); ; shift += 7 {
  2287  				if shift >= 64 {
  2288  					return ErrIntOverflowTypes
  2289  				}
  2290  				if iNdEx >= l {
  2291  					return io.ErrUnexpectedEOF
  2292  				}
  2293  				b := dAtA[iNdEx]
  2294  				iNdEx++
  2295  				m.Height |= uint64(b&0x7F) << shift
  2296  				if b < 0x80 {
  2297  					break
  2298  				}
  2299  			}
  2300  		default:
  2301  			iNdEx = preIndex
  2302  			skippy, err := skipTypes(dAtA[iNdEx:])
  2303  			if err != nil {
  2304  				return err
  2305  			}
  2306  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2307  				return ErrInvalidLengthTypes
  2308  			}
  2309  			if (iNdEx + skippy) > l {
  2310  				return io.ErrUnexpectedEOF
  2311  			}
  2312  			iNdEx += skippy
  2313  		}
  2314  	}
  2315  
  2316  	if iNdEx > l {
  2317  		return io.ErrUnexpectedEOF
  2318  	}
  2319  	return nil
  2320  }
  2321  func (m *LightBlockResponse) Unmarshal(dAtA []byte) error {
  2322  	l := len(dAtA)
  2323  	iNdEx := 0
  2324  	for iNdEx < l {
  2325  		preIndex := iNdEx
  2326  		var wire uint64
  2327  		for shift := uint(0); ; shift += 7 {
  2328  			if shift >= 64 {
  2329  				return ErrIntOverflowTypes
  2330  			}
  2331  			if iNdEx >= l {
  2332  				return io.ErrUnexpectedEOF
  2333  			}
  2334  			b := dAtA[iNdEx]
  2335  			iNdEx++
  2336  			wire |= uint64(b&0x7F) << shift
  2337  			if b < 0x80 {
  2338  				break
  2339  			}
  2340  		}
  2341  		fieldNum := int32(wire >> 3)
  2342  		wireType := int(wire & 0x7)
  2343  		if wireType == 4 {
  2344  			return fmt.Errorf("proto: LightBlockResponse: wiretype end group for non-group")
  2345  		}
  2346  		if fieldNum <= 0 {
  2347  			return fmt.Errorf("proto: LightBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  2348  		}
  2349  		switch fieldNum {
  2350  		case 1:
  2351  			if wireType != 2 {
  2352  				return fmt.Errorf("proto: wrong wireType = %d for field LightBlock", wireType)
  2353  			}
  2354  			var msglen int
  2355  			for shift := uint(0); ; shift += 7 {
  2356  				if shift >= 64 {
  2357  					return ErrIntOverflowTypes
  2358  				}
  2359  				if iNdEx >= l {
  2360  					return io.ErrUnexpectedEOF
  2361  				}
  2362  				b := dAtA[iNdEx]
  2363  				iNdEx++
  2364  				msglen |= int(b&0x7F) << shift
  2365  				if b < 0x80 {
  2366  					break
  2367  				}
  2368  			}
  2369  			if msglen < 0 {
  2370  				return ErrInvalidLengthTypes
  2371  			}
  2372  			postIndex := iNdEx + msglen
  2373  			if postIndex < 0 {
  2374  				return ErrInvalidLengthTypes
  2375  			}
  2376  			if postIndex > l {
  2377  				return io.ErrUnexpectedEOF
  2378  			}
  2379  			if m.LightBlock == nil {
  2380  				m.LightBlock = &types.LightBlock{}
  2381  			}
  2382  			if err := m.LightBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2383  				return err
  2384  			}
  2385  			iNdEx = postIndex
  2386  		default:
  2387  			iNdEx = preIndex
  2388  			skippy, err := skipTypes(dAtA[iNdEx:])
  2389  			if err != nil {
  2390  				return err
  2391  			}
  2392  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2393  				return ErrInvalidLengthTypes
  2394  			}
  2395  			if (iNdEx + skippy) > l {
  2396  				return io.ErrUnexpectedEOF
  2397  			}
  2398  			iNdEx += skippy
  2399  		}
  2400  	}
  2401  
  2402  	if iNdEx > l {
  2403  		return io.ErrUnexpectedEOF
  2404  	}
  2405  	return nil
  2406  }
  2407  func (m *ParamsRequest) Unmarshal(dAtA []byte) error {
  2408  	l := len(dAtA)
  2409  	iNdEx := 0
  2410  	for iNdEx < l {
  2411  		preIndex := iNdEx
  2412  		var wire uint64
  2413  		for shift := uint(0); ; shift += 7 {
  2414  			if shift >= 64 {
  2415  				return ErrIntOverflowTypes
  2416  			}
  2417  			if iNdEx >= l {
  2418  				return io.ErrUnexpectedEOF
  2419  			}
  2420  			b := dAtA[iNdEx]
  2421  			iNdEx++
  2422  			wire |= uint64(b&0x7F) << shift
  2423  			if b < 0x80 {
  2424  				break
  2425  			}
  2426  		}
  2427  		fieldNum := int32(wire >> 3)
  2428  		wireType := int(wire & 0x7)
  2429  		if wireType == 4 {
  2430  			return fmt.Errorf("proto: ParamsRequest: wiretype end group for non-group")
  2431  		}
  2432  		if fieldNum <= 0 {
  2433  			return fmt.Errorf("proto: ParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  2434  		}
  2435  		switch fieldNum {
  2436  		case 1:
  2437  			if wireType != 0 {
  2438  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  2439  			}
  2440  			m.Height = 0
  2441  			for shift := uint(0); ; shift += 7 {
  2442  				if shift >= 64 {
  2443  					return ErrIntOverflowTypes
  2444  				}
  2445  				if iNdEx >= l {
  2446  					return io.ErrUnexpectedEOF
  2447  				}
  2448  				b := dAtA[iNdEx]
  2449  				iNdEx++
  2450  				m.Height |= uint64(b&0x7F) << shift
  2451  				if b < 0x80 {
  2452  					break
  2453  				}
  2454  			}
  2455  		default:
  2456  			iNdEx = preIndex
  2457  			skippy, err := skipTypes(dAtA[iNdEx:])
  2458  			if err != nil {
  2459  				return err
  2460  			}
  2461  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2462  				return ErrInvalidLengthTypes
  2463  			}
  2464  			if (iNdEx + skippy) > l {
  2465  				return io.ErrUnexpectedEOF
  2466  			}
  2467  			iNdEx += skippy
  2468  		}
  2469  	}
  2470  
  2471  	if iNdEx > l {
  2472  		return io.ErrUnexpectedEOF
  2473  	}
  2474  	return nil
  2475  }
  2476  func (m *ParamsResponse) Unmarshal(dAtA []byte) error {
  2477  	l := len(dAtA)
  2478  	iNdEx := 0
  2479  	for iNdEx < l {
  2480  		preIndex := iNdEx
  2481  		var wire uint64
  2482  		for shift := uint(0); ; shift += 7 {
  2483  			if shift >= 64 {
  2484  				return ErrIntOverflowTypes
  2485  			}
  2486  			if iNdEx >= l {
  2487  				return io.ErrUnexpectedEOF
  2488  			}
  2489  			b := dAtA[iNdEx]
  2490  			iNdEx++
  2491  			wire |= uint64(b&0x7F) << shift
  2492  			if b < 0x80 {
  2493  				break
  2494  			}
  2495  		}
  2496  		fieldNum := int32(wire >> 3)
  2497  		wireType := int(wire & 0x7)
  2498  		if wireType == 4 {
  2499  			return fmt.Errorf("proto: ParamsResponse: wiretype end group for non-group")
  2500  		}
  2501  		if fieldNum <= 0 {
  2502  			return fmt.Errorf("proto: ParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  2503  		}
  2504  		switch fieldNum {
  2505  		case 1:
  2506  			if wireType != 0 {
  2507  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  2508  			}
  2509  			m.Height = 0
  2510  			for shift := uint(0); ; shift += 7 {
  2511  				if shift >= 64 {
  2512  					return ErrIntOverflowTypes
  2513  				}
  2514  				if iNdEx >= l {
  2515  					return io.ErrUnexpectedEOF
  2516  				}
  2517  				b := dAtA[iNdEx]
  2518  				iNdEx++
  2519  				m.Height |= uint64(b&0x7F) << shift
  2520  				if b < 0x80 {
  2521  					break
  2522  				}
  2523  			}
  2524  		case 2:
  2525  			if wireType != 2 {
  2526  				return fmt.Errorf("proto: wrong wireType = %d for field ConsensusParams", wireType)
  2527  			}
  2528  			var msglen int
  2529  			for shift := uint(0); ; shift += 7 {
  2530  				if shift >= 64 {
  2531  					return ErrIntOverflowTypes
  2532  				}
  2533  				if iNdEx >= l {
  2534  					return io.ErrUnexpectedEOF
  2535  				}
  2536  				b := dAtA[iNdEx]
  2537  				iNdEx++
  2538  				msglen |= int(b&0x7F) << shift
  2539  				if b < 0x80 {
  2540  					break
  2541  				}
  2542  			}
  2543  			if msglen < 0 {
  2544  				return ErrInvalidLengthTypes
  2545  			}
  2546  			postIndex := iNdEx + msglen
  2547  			if postIndex < 0 {
  2548  				return ErrInvalidLengthTypes
  2549  			}
  2550  			if postIndex > l {
  2551  				return io.ErrUnexpectedEOF
  2552  			}
  2553  			if err := m.ConsensusParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2554  				return err
  2555  			}
  2556  			iNdEx = postIndex
  2557  		default:
  2558  			iNdEx = preIndex
  2559  			skippy, err := skipTypes(dAtA[iNdEx:])
  2560  			if err != nil {
  2561  				return err
  2562  			}
  2563  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2564  				return ErrInvalidLengthTypes
  2565  			}
  2566  			if (iNdEx + skippy) > l {
  2567  				return io.ErrUnexpectedEOF
  2568  			}
  2569  			iNdEx += skippy
  2570  		}
  2571  	}
  2572  
  2573  	if iNdEx > l {
  2574  		return io.ErrUnexpectedEOF
  2575  	}
  2576  	return nil
  2577  }
  2578  func skipTypes(dAtA []byte) (n int, err error) {
  2579  	l := len(dAtA)
  2580  	iNdEx := 0
  2581  	depth := 0
  2582  	for iNdEx < l {
  2583  		var wire uint64
  2584  		for shift := uint(0); ; shift += 7 {
  2585  			if shift >= 64 {
  2586  				return 0, ErrIntOverflowTypes
  2587  			}
  2588  			if iNdEx >= l {
  2589  				return 0, io.ErrUnexpectedEOF
  2590  			}
  2591  			b := dAtA[iNdEx]
  2592  			iNdEx++
  2593  			wire |= (uint64(b) & 0x7F) << shift
  2594  			if b < 0x80 {
  2595  				break
  2596  			}
  2597  		}
  2598  		wireType := int(wire & 0x7)
  2599  		switch wireType {
  2600  		case 0:
  2601  			for shift := uint(0); ; shift += 7 {
  2602  				if shift >= 64 {
  2603  					return 0, ErrIntOverflowTypes
  2604  				}
  2605  				if iNdEx >= l {
  2606  					return 0, io.ErrUnexpectedEOF
  2607  				}
  2608  				iNdEx++
  2609  				if dAtA[iNdEx-1] < 0x80 {
  2610  					break
  2611  				}
  2612  			}
  2613  		case 1:
  2614  			iNdEx += 8
  2615  		case 2:
  2616  			var length int
  2617  			for shift := uint(0); ; shift += 7 {
  2618  				if shift >= 64 {
  2619  					return 0, ErrIntOverflowTypes
  2620  				}
  2621  				if iNdEx >= l {
  2622  					return 0, io.ErrUnexpectedEOF
  2623  				}
  2624  				b := dAtA[iNdEx]
  2625  				iNdEx++
  2626  				length |= (int(b) & 0x7F) << shift
  2627  				if b < 0x80 {
  2628  					break
  2629  				}
  2630  			}
  2631  			if length < 0 {
  2632  				return 0, ErrInvalidLengthTypes
  2633  			}
  2634  			iNdEx += length
  2635  		case 3:
  2636  			depth++
  2637  		case 4:
  2638  			if depth == 0 {
  2639  				return 0, ErrUnexpectedEndOfGroupTypes
  2640  			}
  2641  			depth--
  2642  		case 5:
  2643  			iNdEx += 4
  2644  		default:
  2645  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2646  		}
  2647  		if iNdEx < 0 {
  2648  			return 0, ErrInvalidLengthTypes
  2649  		}
  2650  		if depth == 0 {
  2651  			return iNdEx, nil
  2652  		}
  2653  	}
  2654  	return 0, io.ErrUnexpectedEOF
  2655  }
  2656  
  2657  var (
  2658  	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
  2659  	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
  2660  	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  2661  )