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

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: tendermint/p2p/pex.proto
     3  
     4  package p2p
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/gogo/protobuf/gogoproto"
     9  	proto "github.com/gogo/protobuf/proto"
    10  	io "io"
    11  	math "math"
    12  	math_bits "math/bits"
    13  )
    14  
    15  // Reference imports to suppress errors if they are not otherwise used.
    16  var _ = proto.Marshal
    17  var _ = fmt.Errorf
    18  var _ = math.Inf
    19  
    20  // This is a compile-time assertion to ensure that this generated file
    21  // is compatible with the proto package it is being compiled against.
    22  // A compilation error at this line likely means your copy of the
    23  // proto package needs to be updated.
    24  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    25  
    26  type PexAddress struct {
    27  	URL string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
    28  }
    29  
    30  func (m *PexAddress) Reset()         { *m = PexAddress{} }
    31  func (m *PexAddress) String() string { return proto.CompactTextString(m) }
    32  func (*PexAddress) ProtoMessage()    {}
    33  func (*PexAddress) Descriptor() ([]byte, []int) {
    34  	return fileDescriptor_81c2f011fd13be57, []int{0}
    35  }
    36  func (m *PexAddress) XXX_Unmarshal(b []byte) error {
    37  	return m.Unmarshal(b)
    38  }
    39  func (m *PexAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    40  	if deterministic {
    41  		return xxx_messageInfo_PexAddress.Marshal(b, m, deterministic)
    42  	} else {
    43  		b = b[:cap(b)]
    44  		n, err := m.MarshalToSizedBuffer(b)
    45  		if err != nil {
    46  			return nil, err
    47  		}
    48  		return b[:n], nil
    49  	}
    50  }
    51  func (m *PexAddress) XXX_Merge(src proto.Message) {
    52  	xxx_messageInfo_PexAddress.Merge(m, src)
    53  }
    54  func (m *PexAddress) XXX_Size() int {
    55  	return m.Size()
    56  }
    57  func (m *PexAddress) XXX_DiscardUnknown() {
    58  	xxx_messageInfo_PexAddress.DiscardUnknown(m)
    59  }
    60  
    61  var xxx_messageInfo_PexAddress proto.InternalMessageInfo
    62  
    63  func (m *PexAddress) GetURL() string {
    64  	if m != nil {
    65  		return m.URL
    66  	}
    67  	return ""
    68  }
    69  
    70  type PexRequest struct {
    71  }
    72  
    73  func (m *PexRequest) Reset()         { *m = PexRequest{} }
    74  func (m *PexRequest) String() string { return proto.CompactTextString(m) }
    75  func (*PexRequest) ProtoMessage()    {}
    76  func (*PexRequest) Descriptor() ([]byte, []int) {
    77  	return fileDescriptor_81c2f011fd13be57, []int{1}
    78  }
    79  func (m *PexRequest) XXX_Unmarshal(b []byte) error {
    80  	return m.Unmarshal(b)
    81  }
    82  func (m *PexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    83  	if deterministic {
    84  		return xxx_messageInfo_PexRequest.Marshal(b, m, deterministic)
    85  	} else {
    86  		b = b[:cap(b)]
    87  		n, err := m.MarshalToSizedBuffer(b)
    88  		if err != nil {
    89  			return nil, err
    90  		}
    91  		return b[:n], nil
    92  	}
    93  }
    94  func (m *PexRequest) XXX_Merge(src proto.Message) {
    95  	xxx_messageInfo_PexRequest.Merge(m, src)
    96  }
    97  func (m *PexRequest) XXX_Size() int {
    98  	return m.Size()
    99  }
   100  func (m *PexRequest) XXX_DiscardUnknown() {
   101  	xxx_messageInfo_PexRequest.DiscardUnknown(m)
   102  }
   103  
   104  var xxx_messageInfo_PexRequest proto.InternalMessageInfo
   105  
   106  type PexResponse struct {
   107  	Addresses []PexAddress `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses"`
   108  }
   109  
   110  func (m *PexResponse) Reset()         { *m = PexResponse{} }
   111  func (m *PexResponse) String() string { return proto.CompactTextString(m) }
   112  func (*PexResponse) ProtoMessage()    {}
   113  func (*PexResponse) Descriptor() ([]byte, []int) {
   114  	return fileDescriptor_81c2f011fd13be57, []int{2}
   115  }
   116  func (m *PexResponse) XXX_Unmarshal(b []byte) error {
   117  	return m.Unmarshal(b)
   118  }
   119  func (m *PexResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   120  	if deterministic {
   121  		return xxx_messageInfo_PexResponse.Marshal(b, m, deterministic)
   122  	} else {
   123  		b = b[:cap(b)]
   124  		n, err := m.MarshalToSizedBuffer(b)
   125  		if err != nil {
   126  			return nil, err
   127  		}
   128  		return b[:n], nil
   129  	}
   130  }
   131  func (m *PexResponse) XXX_Merge(src proto.Message) {
   132  	xxx_messageInfo_PexResponse.Merge(m, src)
   133  }
   134  func (m *PexResponse) XXX_Size() int {
   135  	return m.Size()
   136  }
   137  func (m *PexResponse) XXX_DiscardUnknown() {
   138  	xxx_messageInfo_PexResponse.DiscardUnknown(m)
   139  }
   140  
   141  var xxx_messageInfo_PexResponse proto.InternalMessageInfo
   142  
   143  func (m *PexResponse) GetAddresses() []PexAddress {
   144  	if m != nil {
   145  		return m.Addresses
   146  	}
   147  	return nil
   148  }
   149  
   150  type PexMessage struct {
   151  	// Types that are valid to be assigned to Sum:
   152  	//	*PexMessage_PexRequest
   153  	//	*PexMessage_PexResponse
   154  	Sum isPexMessage_Sum `protobuf_oneof:"sum"`
   155  }
   156  
   157  func (m *PexMessage) Reset()         { *m = PexMessage{} }
   158  func (m *PexMessage) String() string { return proto.CompactTextString(m) }
   159  func (*PexMessage) ProtoMessage()    {}
   160  func (*PexMessage) Descriptor() ([]byte, []int) {
   161  	return fileDescriptor_81c2f011fd13be57, []int{3}
   162  }
   163  func (m *PexMessage) XXX_Unmarshal(b []byte) error {
   164  	return m.Unmarshal(b)
   165  }
   166  func (m *PexMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   167  	if deterministic {
   168  		return xxx_messageInfo_PexMessage.Marshal(b, m, deterministic)
   169  	} else {
   170  		b = b[:cap(b)]
   171  		n, err := m.MarshalToSizedBuffer(b)
   172  		if err != nil {
   173  			return nil, err
   174  		}
   175  		return b[:n], nil
   176  	}
   177  }
   178  func (m *PexMessage) XXX_Merge(src proto.Message) {
   179  	xxx_messageInfo_PexMessage.Merge(m, src)
   180  }
   181  func (m *PexMessage) XXX_Size() int {
   182  	return m.Size()
   183  }
   184  func (m *PexMessage) XXX_DiscardUnknown() {
   185  	xxx_messageInfo_PexMessage.DiscardUnknown(m)
   186  }
   187  
   188  var xxx_messageInfo_PexMessage proto.InternalMessageInfo
   189  
   190  type isPexMessage_Sum interface {
   191  	isPexMessage_Sum()
   192  	MarshalTo([]byte) (int, error)
   193  	Size() int
   194  }
   195  
   196  type PexMessage_PexRequest struct {
   197  	PexRequest *PexRequest `protobuf:"bytes,3,opt,name=pex_request,json=pexRequest,proto3,oneof" json:"pex_request,omitempty"`
   198  }
   199  type PexMessage_PexResponse struct {
   200  	PexResponse *PexResponse `protobuf:"bytes,4,opt,name=pex_response,json=pexResponse,proto3,oneof" json:"pex_response,omitempty"`
   201  }
   202  
   203  func (*PexMessage_PexRequest) isPexMessage_Sum()  {}
   204  func (*PexMessage_PexResponse) isPexMessage_Sum() {}
   205  
   206  func (m *PexMessage) GetSum() isPexMessage_Sum {
   207  	if m != nil {
   208  		return m.Sum
   209  	}
   210  	return nil
   211  }
   212  
   213  func (m *PexMessage) GetPexRequest() *PexRequest {
   214  	if x, ok := m.GetSum().(*PexMessage_PexRequest); ok {
   215  		return x.PexRequest
   216  	}
   217  	return nil
   218  }
   219  
   220  func (m *PexMessage) GetPexResponse() *PexResponse {
   221  	if x, ok := m.GetSum().(*PexMessage_PexResponse); ok {
   222  		return x.PexResponse
   223  	}
   224  	return nil
   225  }
   226  
   227  // XXX_OneofWrappers is for the internal use of the proto package.
   228  func (*PexMessage) XXX_OneofWrappers() []interface{} {
   229  	return []interface{}{
   230  		(*PexMessage_PexRequest)(nil),
   231  		(*PexMessage_PexResponse)(nil),
   232  	}
   233  }
   234  
   235  func init() {
   236  	proto.RegisterType((*PexAddress)(nil), "seitendermint.p2p.PexAddress")
   237  	proto.RegisterType((*PexRequest)(nil), "seitendermint.p2p.PexRequest")
   238  	proto.RegisterType((*PexResponse)(nil), "seitendermint.p2p.PexResponse")
   239  	proto.RegisterType((*PexMessage)(nil), "seitendermint.p2p.PexMessage")
   240  }
   241  
   242  func init() { proto.RegisterFile("tendermint/p2p/pex.proto", fileDescriptor_81c2f011fd13be57) }
   243  
   244  var fileDescriptor_81c2f011fd13be57 = []byte{
   245  	// 323 bytes of a gzipped FileDescriptorProto
   246  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x3f, 0x4f, 0xfa, 0x40,
   247  	0x1c, 0xc6, 0x7b, 0x5c, 0x7f, 0x3f, 0xe1, 0xca, 0x80, 0x8d, 0x43, 0x35, 0xf1, 0x20, 0x9d, 0x58,
   248  	0x68, 0x13, 0x98, 0xdc, 0xa4, 0x2e, 0x84, 0x68, 0x42, 0xce, 0xb8, 0xb8, 0x98, 0x02, 0xdf, 0x94,
   249  	0x26, 0xd2, 0x3b, 0xef, 0xda, 0x84, 0x97, 0xe1, 0xab, 0xf0, 0xb5, 0x30, 0x32, 0x3a, 0x11, 0xd3,
   250  	0xbe, 0x11, 0xc3, 0x9d, 0xb1, 0x1a, 0xc3, 0x76, 0xdf, 0x7f, 0x9f, 0xe7, 0xc9, 0x3d, 0xc4, 0xcb,
   251  	0x21, 0x5b, 0x82, 0x5c, 0xa7, 0x59, 0x1e, 0x8a, 0xa1, 0x08, 0x05, 0x6c, 0x02, 0x21, 0x79, 0xce,
   252  	0xdd, 0x53, 0x05, 0x69, 0x3d, 0x0c, 0xc4, 0x50, 0x5c, 0x9c, 0x25, 0x3c, 0xe1, 0x7a, 0x1a, 0x1e,
   253  	0x5e, 0x66, 0xd1, 0x1f, 0x11, 0x32, 0x83, 0xcd, 0x78, 0xb9, 0x94, 0xa0, 0x94, 0x7b, 0x4e, 0x70,
   254  	0x21, 0x9f, 0x3d, 0xd4, 0x43, 0xfd, 0x56, 0x74, 0x52, 0xee, 0xbb, 0xf8, 0x81, 0xdd, 0xb2, 0x43,
   255  	0x6f, 0x6a, 0x37, 0x1b, 0x1d, 0x3c, 0xb5, 0x9b, 0xb8, 0x63, 0xfb, 0x6d, 0x7d, 0xc4, 0xe0, 0xa5,
   256  	0x00, 0x95, 0xfb, 0x33, 0xe2, 0xe8, 0x4a, 0x09, 0x9e, 0x29, 0x70, 0xc7, 0xa4, 0x15, 0x1b, 0x1c,
   257  	0x28, 0x0f, 0xf5, 0x70, 0xdf, 0x19, 0x5e, 0x06, 0x7f, 0xec, 0x04, 0xb5, 0x6a, 0x64, 0x6f, 0xf7,
   258  	0x5d, 0x8b, 0xd5, 0x57, 0xfe, 0x1b, 0xd2, 0x02, 0x77, 0xa0, 0x54, 0x9c, 0x80, 0x7b, 0x4d, 0x1c,
   259  	0x01, 0x9b, 0x27, 0x69, 0xf4, 0x3c, 0xdc, 0x43, 0xc7, 0x99, 0x5f, 0xa6, 0x26, 0x16, 0x23, 0xe2,
   260  	0xbb, 0x72, 0x6f, 0x48, 0xdb, 0x10, 0x8c, 0x47, 0xcf, 0xd6, 0x08, 0x7a, 0x0c, 0x61, 0xb6, 0x26,
   261  	0x16, 0x73, 0x44, 0x5d, 0x46, 0xff, 0x08, 0x56, 0xc5, 0x7a, 0x6a, 0x37, 0x51, 0xa7, 0x61, 0xbe,
   262  	0x23, 0xba, 0xdf, 0x96, 0x14, 0xed, 0x4a, 0x8a, 0x3e, 0x4a, 0x8a, 0x5e, 0x2b, 0x6a, 0xed, 0x2a,
   263  	0x6a, 0xbd, 0x57, 0xd4, 0x7a, 0xbc, 0x4a, 0xd2, 0x7c, 0x55, 0xcc, 0x83, 0x05, 0x5f, 0x87, 0xb1,
   264  	0x4c, 0x07, 0x71, 0xb6, 0x58, 0x71, 0x19, 0x2a, 0x48, 0x07, 0x3f, 0x43, 0xd3, 0x71, 0xfc, 0x4e,
   265  	0x71, 0xfe, 0x5f, 0x77, 0x47, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x04, 0x7a, 0x1e, 0xde,
   266  	0x01, 0x00, 0x00,
   267  }
   268  
   269  func (m *PexAddress) Marshal() (dAtA []byte, err error) {
   270  	size := m.Size()
   271  	dAtA = make([]byte, size)
   272  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   273  	if err != nil {
   274  		return nil, err
   275  	}
   276  	return dAtA[:n], nil
   277  }
   278  
   279  func (m *PexAddress) MarshalTo(dAtA []byte) (int, error) {
   280  	size := m.Size()
   281  	return m.MarshalToSizedBuffer(dAtA[:size])
   282  }
   283  
   284  func (m *PexAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   285  	i := len(dAtA)
   286  	_ = i
   287  	var l int
   288  	_ = l
   289  	if len(m.URL) > 0 {
   290  		i -= len(m.URL)
   291  		copy(dAtA[i:], m.URL)
   292  		i = encodeVarintPex(dAtA, i, uint64(len(m.URL)))
   293  		i--
   294  		dAtA[i] = 0xa
   295  	}
   296  	return len(dAtA) - i, nil
   297  }
   298  
   299  func (m *PexRequest) Marshal() (dAtA []byte, err error) {
   300  	size := m.Size()
   301  	dAtA = make([]byte, size)
   302  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   303  	if err != nil {
   304  		return nil, err
   305  	}
   306  	return dAtA[:n], nil
   307  }
   308  
   309  func (m *PexRequest) MarshalTo(dAtA []byte) (int, error) {
   310  	size := m.Size()
   311  	return m.MarshalToSizedBuffer(dAtA[:size])
   312  }
   313  
   314  func (m *PexRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   315  	i := len(dAtA)
   316  	_ = i
   317  	var l int
   318  	_ = l
   319  	return len(dAtA) - i, nil
   320  }
   321  
   322  func (m *PexResponse) Marshal() (dAtA []byte, err error) {
   323  	size := m.Size()
   324  	dAtA = make([]byte, size)
   325  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   326  	if err != nil {
   327  		return nil, err
   328  	}
   329  	return dAtA[:n], nil
   330  }
   331  
   332  func (m *PexResponse) MarshalTo(dAtA []byte) (int, error) {
   333  	size := m.Size()
   334  	return m.MarshalToSizedBuffer(dAtA[:size])
   335  }
   336  
   337  func (m *PexResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   338  	i := len(dAtA)
   339  	_ = i
   340  	var l int
   341  	_ = l
   342  	if len(m.Addresses) > 0 {
   343  		for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
   344  			{
   345  				size, err := m.Addresses[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   346  				if err != nil {
   347  					return 0, err
   348  				}
   349  				i -= size
   350  				i = encodeVarintPex(dAtA, i, uint64(size))
   351  			}
   352  			i--
   353  			dAtA[i] = 0xa
   354  		}
   355  	}
   356  	return len(dAtA) - i, nil
   357  }
   358  
   359  func (m *PexMessage) Marshal() (dAtA []byte, err error) {
   360  	size := m.Size()
   361  	dAtA = make([]byte, size)
   362  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   363  	if err != nil {
   364  		return nil, err
   365  	}
   366  	return dAtA[:n], nil
   367  }
   368  
   369  func (m *PexMessage) MarshalTo(dAtA []byte) (int, error) {
   370  	size := m.Size()
   371  	return m.MarshalToSizedBuffer(dAtA[:size])
   372  }
   373  
   374  func (m *PexMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   375  	i := len(dAtA)
   376  	_ = i
   377  	var l int
   378  	_ = l
   379  	if m.Sum != nil {
   380  		{
   381  			size := m.Sum.Size()
   382  			i -= size
   383  			if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil {
   384  				return 0, err
   385  			}
   386  		}
   387  	}
   388  	return len(dAtA) - i, nil
   389  }
   390  
   391  func (m *PexMessage_PexRequest) MarshalTo(dAtA []byte) (int, error) {
   392  	size := m.Size()
   393  	return m.MarshalToSizedBuffer(dAtA[:size])
   394  }
   395  
   396  func (m *PexMessage_PexRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   397  	i := len(dAtA)
   398  	if m.PexRequest != nil {
   399  		{
   400  			size, err := m.PexRequest.MarshalToSizedBuffer(dAtA[:i])
   401  			if err != nil {
   402  				return 0, err
   403  			}
   404  			i -= size
   405  			i = encodeVarintPex(dAtA, i, uint64(size))
   406  		}
   407  		i--
   408  		dAtA[i] = 0x1a
   409  	}
   410  	return len(dAtA) - i, nil
   411  }
   412  func (m *PexMessage_PexResponse) MarshalTo(dAtA []byte) (int, error) {
   413  	size := m.Size()
   414  	return m.MarshalToSizedBuffer(dAtA[:size])
   415  }
   416  
   417  func (m *PexMessage_PexResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   418  	i := len(dAtA)
   419  	if m.PexResponse != nil {
   420  		{
   421  			size, err := m.PexResponse.MarshalToSizedBuffer(dAtA[:i])
   422  			if err != nil {
   423  				return 0, err
   424  			}
   425  			i -= size
   426  			i = encodeVarintPex(dAtA, i, uint64(size))
   427  		}
   428  		i--
   429  		dAtA[i] = 0x22
   430  	}
   431  	return len(dAtA) - i, nil
   432  }
   433  func encodeVarintPex(dAtA []byte, offset int, v uint64) int {
   434  	offset -= sovPex(v)
   435  	base := offset
   436  	for v >= 1<<7 {
   437  		dAtA[offset] = uint8(v&0x7f | 0x80)
   438  		v >>= 7
   439  		offset++
   440  	}
   441  	dAtA[offset] = uint8(v)
   442  	return base
   443  }
   444  func (m *PexAddress) Size() (n int) {
   445  	if m == nil {
   446  		return 0
   447  	}
   448  	var l int
   449  	_ = l
   450  	l = len(m.URL)
   451  	if l > 0 {
   452  		n += 1 + l + sovPex(uint64(l))
   453  	}
   454  	return n
   455  }
   456  
   457  func (m *PexRequest) Size() (n int) {
   458  	if m == nil {
   459  		return 0
   460  	}
   461  	var l int
   462  	_ = l
   463  	return n
   464  }
   465  
   466  func (m *PexResponse) Size() (n int) {
   467  	if m == nil {
   468  		return 0
   469  	}
   470  	var l int
   471  	_ = l
   472  	if len(m.Addresses) > 0 {
   473  		for _, e := range m.Addresses {
   474  			l = e.Size()
   475  			n += 1 + l + sovPex(uint64(l))
   476  		}
   477  	}
   478  	return n
   479  }
   480  
   481  func (m *PexMessage) Size() (n int) {
   482  	if m == nil {
   483  		return 0
   484  	}
   485  	var l int
   486  	_ = l
   487  	if m.Sum != nil {
   488  		n += m.Sum.Size()
   489  	}
   490  	return n
   491  }
   492  
   493  func (m *PexMessage_PexRequest) Size() (n int) {
   494  	if m == nil {
   495  		return 0
   496  	}
   497  	var l int
   498  	_ = l
   499  	if m.PexRequest != nil {
   500  		l = m.PexRequest.Size()
   501  		n += 1 + l + sovPex(uint64(l))
   502  	}
   503  	return n
   504  }
   505  func (m *PexMessage_PexResponse) Size() (n int) {
   506  	if m == nil {
   507  		return 0
   508  	}
   509  	var l int
   510  	_ = l
   511  	if m.PexResponse != nil {
   512  		l = m.PexResponse.Size()
   513  		n += 1 + l + sovPex(uint64(l))
   514  	}
   515  	return n
   516  }
   517  
   518  func sovPex(x uint64) (n int) {
   519  	return (math_bits.Len64(x|1) + 6) / 7
   520  }
   521  func sozPex(x uint64) (n int) {
   522  	return sovPex(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   523  }
   524  func (m *PexAddress) Unmarshal(dAtA []byte) error {
   525  	l := len(dAtA)
   526  	iNdEx := 0
   527  	for iNdEx < l {
   528  		preIndex := iNdEx
   529  		var wire uint64
   530  		for shift := uint(0); ; shift += 7 {
   531  			if shift >= 64 {
   532  				return ErrIntOverflowPex
   533  			}
   534  			if iNdEx >= l {
   535  				return io.ErrUnexpectedEOF
   536  			}
   537  			b := dAtA[iNdEx]
   538  			iNdEx++
   539  			wire |= uint64(b&0x7F) << shift
   540  			if b < 0x80 {
   541  				break
   542  			}
   543  		}
   544  		fieldNum := int32(wire >> 3)
   545  		wireType := int(wire & 0x7)
   546  		if wireType == 4 {
   547  			return fmt.Errorf("proto: PexAddress: wiretype end group for non-group")
   548  		}
   549  		if fieldNum <= 0 {
   550  			return fmt.Errorf("proto: PexAddress: illegal tag %d (wire type %d)", fieldNum, wire)
   551  		}
   552  		switch fieldNum {
   553  		case 1:
   554  			if wireType != 2 {
   555  				return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType)
   556  			}
   557  			var stringLen uint64
   558  			for shift := uint(0); ; shift += 7 {
   559  				if shift >= 64 {
   560  					return ErrIntOverflowPex
   561  				}
   562  				if iNdEx >= l {
   563  					return io.ErrUnexpectedEOF
   564  				}
   565  				b := dAtA[iNdEx]
   566  				iNdEx++
   567  				stringLen |= uint64(b&0x7F) << shift
   568  				if b < 0x80 {
   569  					break
   570  				}
   571  			}
   572  			intStringLen := int(stringLen)
   573  			if intStringLen < 0 {
   574  				return ErrInvalidLengthPex
   575  			}
   576  			postIndex := iNdEx + intStringLen
   577  			if postIndex < 0 {
   578  				return ErrInvalidLengthPex
   579  			}
   580  			if postIndex > l {
   581  				return io.ErrUnexpectedEOF
   582  			}
   583  			m.URL = string(dAtA[iNdEx:postIndex])
   584  			iNdEx = postIndex
   585  		default:
   586  			iNdEx = preIndex
   587  			skippy, err := skipPex(dAtA[iNdEx:])
   588  			if err != nil {
   589  				return err
   590  			}
   591  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   592  				return ErrInvalidLengthPex
   593  			}
   594  			if (iNdEx + skippy) > l {
   595  				return io.ErrUnexpectedEOF
   596  			}
   597  			iNdEx += skippy
   598  		}
   599  	}
   600  
   601  	if iNdEx > l {
   602  		return io.ErrUnexpectedEOF
   603  	}
   604  	return nil
   605  }
   606  func (m *PexRequest) Unmarshal(dAtA []byte) error {
   607  	l := len(dAtA)
   608  	iNdEx := 0
   609  	for iNdEx < l {
   610  		preIndex := iNdEx
   611  		var wire uint64
   612  		for shift := uint(0); ; shift += 7 {
   613  			if shift >= 64 {
   614  				return ErrIntOverflowPex
   615  			}
   616  			if iNdEx >= l {
   617  				return io.ErrUnexpectedEOF
   618  			}
   619  			b := dAtA[iNdEx]
   620  			iNdEx++
   621  			wire |= uint64(b&0x7F) << shift
   622  			if b < 0x80 {
   623  				break
   624  			}
   625  		}
   626  		fieldNum := int32(wire >> 3)
   627  		wireType := int(wire & 0x7)
   628  		if wireType == 4 {
   629  			return fmt.Errorf("proto: PexRequest: wiretype end group for non-group")
   630  		}
   631  		if fieldNum <= 0 {
   632  			return fmt.Errorf("proto: PexRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   633  		}
   634  		switch fieldNum {
   635  		default:
   636  			iNdEx = preIndex
   637  			skippy, err := skipPex(dAtA[iNdEx:])
   638  			if err != nil {
   639  				return err
   640  			}
   641  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   642  				return ErrInvalidLengthPex
   643  			}
   644  			if (iNdEx + skippy) > l {
   645  				return io.ErrUnexpectedEOF
   646  			}
   647  			iNdEx += skippy
   648  		}
   649  	}
   650  
   651  	if iNdEx > l {
   652  		return io.ErrUnexpectedEOF
   653  	}
   654  	return nil
   655  }
   656  func (m *PexResponse) Unmarshal(dAtA []byte) error {
   657  	l := len(dAtA)
   658  	iNdEx := 0
   659  	for iNdEx < l {
   660  		preIndex := iNdEx
   661  		var wire uint64
   662  		for shift := uint(0); ; shift += 7 {
   663  			if shift >= 64 {
   664  				return ErrIntOverflowPex
   665  			}
   666  			if iNdEx >= l {
   667  				return io.ErrUnexpectedEOF
   668  			}
   669  			b := dAtA[iNdEx]
   670  			iNdEx++
   671  			wire |= uint64(b&0x7F) << shift
   672  			if b < 0x80 {
   673  				break
   674  			}
   675  		}
   676  		fieldNum := int32(wire >> 3)
   677  		wireType := int(wire & 0x7)
   678  		if wireType == 4 {
   679  			return fmt.Errorf("proto: PexResponse: wiretype end group for non-group")
   680  		}
   681  		if fieldNum <= 0 {
   682  			return fmt.Errorf("proto: PexResponse: illegal tag %d (wire type %d)", fieldNum, wire)
   683  		}
   684  		switch fieldNum {
   685  		case 1:
   686  			if wireType != 2 {
   687  				return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
   688  			}
   689  			var msglen int
   690  			for shift := uint(0); ; shift += 7 {
   691  				if shift >= 64 {
   692  					return ErrIntOverflowPex
   693  				}
   694  				if iNdEx >= l {
   695  					return io.ErrUnexpectedEOF
   696  				}
   697  				b := dAtA[iNdEx]
   698  				iNdEx++
   699  				msglen |= int(b&0x7F) << shift
   700  				if b < 0x80 {
   701  					break
   702  				}
   703  			}
   704  			if msglen < 0 {
   705  				return ErrInvalidLengthPex
   706  			}
   707  			postIndex := iNdEx + msglen
   708  			if postIndex < 0 {
   709  				return ErrInvalidLengthPex
   710  			}
   711  			if postIndex > l {
   712  				return io.ErrUnexpectedEOF
   713  			}
   714  			m.Addresses = append(m.Addresses, PexAddress{})
   715  			if err := m.Addresses[len(m.Addresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   716  				return err
   717  			}
   718  			iNdEx = postIndex
   719  		default:
   720  			iNdEx = preIndex
   721  			skippy, err := skipPex(dAtA[iNdEx:])
   722  			if err != nil {
   723  				return err
   724  			}
   725  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   726  				return ErrInvalidLengthPex
   727  			}
   728  			if (iNdEx + skippy) > l {
   729  				return io.ErrUnexpectedEOF
   730  			}
   731  			iNdEx += skippy
   732  		}
   733  	}
   734  
   735  	if iNdEx > l {
   736  		return io.ErrUnexpectedEOF
   737  	}
   738  	return nil
   739  }
   740  func (m *PexMessage) Unmarshal(dAtA []byte) error {
   741  	l := len(dAtA)
   742  	iNdEx := 0
   743  	for iNdEx < l {
   744  		preIndex := iNdEx
   745  		var wire uint64
   746  		for shift := uint(0); ; shift += 7 {
   747  			if shift >= 64 {
   748  				return ErrIntOverflowPex
   749  			}
   750  			if iNdEx >= l {
   751  				return io.ErrUnexpectedEOF
   752  			}
   753  			b := dAtA[iNdEx]
   754  			iNdEx++
   755  			wire |= uint64(b&0x7F) << shift
   756  			if b < 0x80 {
   757  				break
   758  			}
   759  		}
   760  		fieldNum := int32(wire >> 3)
   761  		wireType := int(wire & 0x7)
   762  		if wireType == 4 {
   763  			return fmt.Errorf("proto: PexMessage: wiretype end group for non-group")
   764  		}
   765  		if fieldNum <= 0 {
   766  			return fmt.Errorf("proto: PexMessage: illegal tag %d (wire type %d)", fieldNum, wire)
   767  		}
   768  		switch fieldNum {
   769  		case 3:
   770  			if wireType != 2 {
   771  				return fmt.Errorf("proto: wrong wireType = %d for field PexRequest", wireType)
   772  			}
   773  			var msglen int
   774  			for shift := uint(0); ; shift += 7 {
   775  				if shift >= 64 {
   776  					return ErrIntOverflowPex
   777  				}
   778  				if iNdEx >= l {
   779  					return io.ErrUnexpectedEOF
   780  				}
   781  				b := dAtA[iNdEx]
   782  				iNdEx++
   783  				msglen |= int(b&0x7F) << shift
   784  				if b < 0x80 {
   785  					break
   786  				}
   787  			}
   788  			if msglen < 0 {
   789  				return ErrInvalidLengthPex
   790  			}
   791  			postIndex := iNdEx + msglen
   792  			if postIndex < 0 {
   793  				return ErrInvalidLengthPex
   794  			}
   795  			if postIndex > l {
   796  				return io.ErrUnexpectedEOF
   797  			}
   798  			v := &PexRequest{}
   799  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   800  				return err
   801  			}
   802  			m.Sum = &PexMessage_PexRequest{v}
   803  			iNdEx = postIndex
   804  		case 4:
   805  			if wireType != 2 {
   806  				return fmt.Errorf("proto: wrong wireType = %d for field PexResponse", wireType)
   807  			}
   808  			var msglen int
   809  			for shift := uint(0); ; shift += 7 {
   810  				if shift >= 64 {
   811  					return ErrIntOverflowPex
   812  				}
   813  				if iNdEx >= l {
   814  					return io.ErrUnexpectedEOF
   815  				}
   816  				b := dAtA[iNdEx]
   817  				iNdEx++
   818  				msglen |= int(b&0x7F) << shift
   819  				if b < 0x80 {
   820  					break
   821  				}
   822  			}
   823  			if msglen < 0 {
   824  				return ErrInvalidLengthPex
   825  			}
   826  			postIndex := iNdEx + msglen
   827  			if postIndex < 0 {
   828  				return ErrInvalidLengthPex
   829  			}
   830  			if postIndex > l {
   831  				return io.ErrUnexpectedEOF
   832  			}
   833  			v := &PexResponse{}
   834  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   835  				return err
   836  			}
   837  			m.Sum = &PexMessage_PexResponse{v}
   838  			iNdEx = postIndex
   839  		default:
   840  			iNdEx = preIndex
   841  			skippy, err := skipPex(dAtA[iNdEx:])
   842  			if err != nil {
   843  				return err
   844  			}
   845  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   846  				return ErrInvalidLengthPex
   847  			}
   848  			if (iNdEx + skippy) > l {
   849  				return io.ErrUnexpectedEOF
   850  			}
   851  			iNdEx += skippy
   852  		}
   853  	}
   854  
   855  	if iNdEx > l {
   856  		return io.ErrUnexpectedEOF
   857  	}
   858  	return nil
   859  }
   860  func skipPex(dAtA []byte) (n int, err error) {
   861  	l := len(dAtA)
   862  	iNdEx := 0
   863  	depth := 0
   864  	for iNdEx < l {
   865  		var wire uint64
   866  		for shift := uint(0); ; shift += 7 {
   867  			if shift >= 64 {
   868  				return 0, ErrIntOverflowPex
   869  			}
   870  			if iNdEx >= l {
   871  				return 0, io.ErrUnexpectedEOF
   872  			}
   873  			b := dAtA[iNdEx]
   874  			iNdEx++
   875  			wire |= (uint64(b) & 0x7F) << shift
   876  			if b < 0x80 {
   877  				break
   878  			}
   879  		}
   880  		wireType := int(wire & 0x7)
   881  		switch wireType {
   882  		case 0:
   883  			for shift := uint(0); ; shift += 7 {
   884  				if shift >= 64 {
   885  					return 0, ErrIntOverflowPex
   886  				}
   887  				if iNdEx >= l {
   888  					return 0, io.ErrUnexpectedEOF
   889  				}
   890  				iNdEx++
   891  				if dAtA[iNdEx-1] < 0x80 {
   892  					break
   893  				}
   894  			}
   895  		case 1:
   896  			iNdEx += 8
   897  		case 2:
   898  			var length int
   899  			for shift := uint(0); ; shift += 7 {
   900  				if shift >= 64 {
   901  					return 0, ErrIntOverflowPex
   902  				}
   903  				if iNdEx >= l {
   904  					return 0, io.ErrUnexpectedEOF
   905  				}
   906  				b := dAtA[iNdEx]
   907  				iNdEx++
   908  				length |= (int(b) & 0x7F) << shift
   909  				if b < 0x80 {
   910  					break
   911  				}
   912  			}
   913  			if length < 0 {
   914  				return 0, ErrInvalidLengthPex
   915  			}
   916  			iNdEx += length
   917  		case 3:
   918  			depth++
   919  		case 4:
   920  			if depth == 0 {
   921  				return 0, ErrUnexpectedEndOfGroupPex
   922  			}
   923  			depth--
   924  		case 5:
   925  			iNdEx += 4
   926  		default:
   927  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   928  		}
   929  		if iNdEx < 0 {
   930  			return 0, ErrInvalidLengthPex
   931  		}
   932  		if depth == 0 {
   933  			return iNdEx, nil
   934  		}
   935  	}
   936  	return 0, io.ErrUnexpectedEOF
   937  }
   938  
   939  var (
   940  	ErrInvalidLengthPex        = fmt.Errorf("proto: negative length found during unmarshaling")
   941  	ErrIntOverflowPex          = fmt.Errorf("proto: integer overflow")
   942  	ErrUnexpectedEndOfGroupPex = fmt.Errorf("proto: unexpected end of group")
   943  )