Commit 11af061e authored by Steven Allen's avatar Steven Allen

chore(dep): update protobuf

parent a5bf2487
...@@ -9,6 +9,7 @@ import ( ...@@ -9,6 +9,7 @@ import (
proto "github.com/gogo/protobuf/proto" proto "github.com/gogo/protobuf/proto"
io "io" io "io"
math "math" math "math"
math_bits "math/bits"
) )
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
...@@ -20,7 +21,7 @@ var _ = math.Inf ...@@ -20,7 +21,7 @@ var _ = math.Inf
// is compatible with the proto package it is being compiled against. // is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the // A compilation error at this line likely means your copy of the
// proto package needs to be updated. // proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type KeyType int32 type KeyType int32
...@@ -87,7 +88,7 @@ func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { ...@@ -87,7 +88,7 @@ func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PublicKey.Marshal(b, m, deterministic) return xxx_messageInfo_PublicKey.Marshal(b, m, deterministic)
} else { } else {
b = b[:cap(b)] b = b[:cap(b)]
n, err := m.MarshalTo(b) n, err := m.MarshalToSizedBuffer(b)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -139,7 +140,7 @@ func (m *PrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { ...@@ -139,7 +140,7 @@ func (m *PrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PrivateKey.Marshal(b, m, deterministic) return xxx_messageInfo_PrivateKey.Marshal(b, m, deterministic)
} else { } else {
b = b[:cap(b)] b = b[:cap(b)]
n, err := m.MarshalTo(b) n, err := m.MarshalToSizedBuffer(b)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -200,7 +201,7 @@ var fileDescriptor_527278fb02d03321 = []byte{ ...@@ -200,7 +201,7 @@ var fileDescriptor_527278fb02d03321 = []byte{
func (m *PublicKey) Marshal() (dAtA []byte, err error) { func (m *PublicKey) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA) n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -208,26 +209,32 @@ func (m *PublicKey) Marshal() (dAtA []byte, err error) { ...@@ -208,26 +209,32 @@ func (m *PublicKey) Marshal() (dAtA []byte, err error) {
} }
func (m *PublicKey) MarshalTo(dAtA []byte) (int, error) { func (m *PublicKey) MarshalTo(dAtA []byte) (int, error) {
var i int size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i _ = i
var l int var l int
_ = l _ = l
dAtA[i] = 0x8
i++
i = encodeVarintCrypto(dAtA, i, uint64(m.Type))
if m.Data != nil { if m.Data != nil {
dAtA[i] = 0x12 i -= len(m.Data)
i++ copy(dAtA[i:], m.Data)
i = encodeVarintCrypto(dAtA, i, uint64(len(m.Data))) i = encodeVarintCrypto(dAtA, i, uint64(len(m.Data)))
i += copy(dAtA[i:], m.Data) i--
dAtA[i] = 0x12
} }
return i, nil i = encodeVarintCrypto(dAtA, i, uint64(m.Type))
i--
dAtA[i] = 0x8
return len(dAtA) - i, nil
} }
func (m *PrivateKey) Marshal() (dAtA []byte, err error) { func (m *PrivateKey) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA) n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -235,30 +242,38 @@ func (m *PrivateKey) Marshal() (dAtA []byte, err error) { ...@@ -235,30 +242,38 @@ func (m *PrivateKey) Marshal() (dAtA []byte, err error) {
} }
func (m *PrivateKey) MarshalTo(dAtA []byte) (int, error) { func (m *PrivateKey) MarshalTo(dAtA []byte) (int, error) {
var i int size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PrivateKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i _ = i
var l int var l int
_ = l _ = l
dAtA[i] = 0x8
i++
i = encodeVarintCrypto(dAtA, i, uint64(m.Type))
if m.Data != nil { if m.Data != nil {
dAtA[i] = 0x12 i -= len(m.Data)
i++ copy(dAtA[i:], m.Data)
i = encodeVarintCrypto(dAtA, i, uint64(len(m.Data))) i = encodeVarintCrypto(dAtA, i, uint64(len(m.Data)))
i += copy(dAtA[i:], m.Data) i--
dAtA[i] = 0x12
} }
return i, nil i = encodeVarintCrypto(dAtA, i, uint64(m.Type))
i--
dAtA[i] = 0x8
return len(dAtA) - i, nil
} }
func encodeVarintCrypto(dAtA []byte, offset int, v uint64) int { func encodeVarintCrypto(dAtA []byte, offset int, v uint64) int {
offset -= sovCrypto(v)
base := offset
for v >= 1<<7 { for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80) dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7 v >>= 7
offset++ offset++
} }
dAtA[offset] = uint8(v) dAtA[offset] = uint8(v)
return offset + 1 return base
} }
func (m *PublicKey) Size() (n int) { func (m *PublicKey) Size() (n int) {
if m == nil { if m == nil {
...@@ -289,14 +304,7 @@ func (m *PrivateKey) Size() (n int) { ...@@ -289,14 +304,7 @@ func (m *PrivateKey) Size() (n int) {
} }
func sovCrypto(x uint64) (n int) { func sovCrypto(x uint64) (n int) {
for { return (math_bits.Len64(x|1) + 6) / 7
n++
x >>= 7
if x == 0 {
break
}
}
return n
} }
func sozCrypto(x uint64) (n int) { func sozCrypto(x uint64) (n int) {
return sovCrypto(uint64((x << 1) ^ uint64((int64(x) >> 63)))) return sovCrypto(uint64((x << 1) ^ uint64((int64(x) >> 63))))
...@@ -534,6 +542,7 @@ func (m *PrivateKey) Unmarshal(dAtA []byte) error { ...@@ -534,6 +542,7 @@ func (m *PrivateKey) Unmarshal(dAtA []byte) error {
func skipCrypto(dAtA []byte) (n int, err error) { func skipCrypto(dAtA []byte) (n int, err error) {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
depth := 0
for iNdEx < l { for iNdEx < l {
var wire uint64 var wire uint64
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
...@@ -565,10 +574,8 @@ func skipCrypto(dAtA []byte) (n int, err error) { ...@@ -565,10 +574,8 @@ func skipCrypto(dAtA []byte) (n int, err error) {
break break
} }
} }
return iNdEx, nil
case 1: case 1:
iNdEx += 8 iNdEx += 8
return iNdEx, nil
case 2: case 2:
var length int var length int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
...@@ -589,55 +596,30 @@ func skipCrypto(dAtA []byte) (n int, err error) { ...@@ -589,55 +596,30 @@ func skipCrypto(dAtA []byte) (n int, err error) {
return 0, ErrInvalidLengthCrypto return 0, ErrInvalidLengthCrypto
} }
iNdEx += length iNdEx += length
if iNdEx < 0 {
return 0, ErrInvalidLengthCrypto
}
return iNdEx, nil
case 3: case 3:
for { depth++
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowCrypto
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipCrypto(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
if iNdEx < 0 {
return 0, ErrInvalidLengthCrypto
}
}
return iNdEx, nil
case 4: case 4:
return iNdEx, nil if depth == 0 {
return 0, ErrUnexpectedEndOfGroupCrypto
}
depth--
case 5: case 5:
iNdEx += 4 iNdEx += 4
return iNdEx, nil
default: default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType) return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
} }
if iNdEx < 0 {
return 0, ErrInvalidLengthCrypto
}
if depth == 0 {
return iNdEx, nil
}
} }
panic("unreachable") return 0, io.ErrUnexpectedEOF
} }
var ( var (
ErrInvalidLengthCrypto = fmt.Errorf("proto: negative length found during unmarshaling") ErrInvalidLengthCrypto = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowCrypto = fmt.Errorf("proto: integer overflow") ErrIntOverflowCrypto = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupCrypto = fmt.Errorf("proto: unexpected end of group")
) )
...@@ -3,7 +3,7 @@ module github.com/libp2p/go-libp2p-core ...@@ -3,7 +3,7 @@ module github.com/libp2p/go-libp2p-core
require ( require (
github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3 github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3
github.com/coreos/go-semver v0.3.0 github.com/coreos/go-semver v0.3.0
github.com/gogo/protobuf v1.3.0 github.com/gogo/protobuf v1.3.1
github.com/ipfs/go-cid v0.0.3 github.com/ipfs/go-cid v0.0.3
github.com/jbenet/goprocess v0.1.3 github.com/jbenet/goprocess v0.1.3
github.com/libp2p/go-flow-metrics v0.0.1 github.com/libp2p/go-flow-metrics v0.0.1
......
...@@ -26,8 +26,8 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2 ...@@ -26,8 +26,8 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/gogo/protobuf v1.3.0 h1:G8O7TerXerS4F6sx9OV7/nRfJdnXgHZu/S/7F2SN+UE= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment