github.com/evdatsion/aphelion-dpos-bft@v0.32.1/benchmarks/proto/test.pb.go (about)

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