Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deps: Update cid package #243

Merged
merged 3 commits into from
Feb 7, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
custom: track new varint error
Signed-off-by: Sander Pick <[email protected]>
  • Loading branch information
sanderpick committed Feb 7, 2020
commit 5b3d35fbdfe74ab87a19989b7bd082f2ad497f5a
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ require (
github.com/multiformats/go-multiaddr v0.2.0
github.com/multiformats/go-multibase v0.0.1
github.com/multiformats/go-multihash v0.0.13
github.com/multiformats/go-varint v0.0.5
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/namsral/flag v1.7.4-pre
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
Expand Down
3 changes: 2 additions & 1 deletion service/pb/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
pt "github.com/libp2p/go-libp2p-core/test"
ma "github.com/multiformats/go-multiaddr"
mh "github.com/multiformats/go-multihash"
varint "github.com/multiformats/go-varint"
"github.com/textileio/go-threads/core/thread"
"github.com/textileio/go-threads/crypto/symmetric"
)
Expand Down Expand Up @@ -123,7 +124,7 @@ func (c ProtoCid) MarshalJSON() ([]byte, error) {

func (c *ProtoCid) Unmarshal(data []byte) (err error) {
c.Cid, err = cid.Cast(data)
if err == cid.ErrCidTooShort {
if err == varint.ErrUnderflow {
c.Cid = cid.Undef
return nil
}
Expand Down