Skip to content

Commit 90b4d16

Browse files
authored
feat(deps): update go-ipld-prime v0.7.0 (#145)
upgrade to latest go-ipld-prime and make needed type conversions
1 parent 061d668 commit 90b4d16

File tree

16 files changed

+2922
-2825
lines changed

16 files changed

+2922
-2825
lines changed

cidset/cidset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
// EncodeCidSet encodes a cid set into bytes for the do-no-send-cids extension
1515
func EncodeCidSet(cids *cid.Set) ([]byte, error) {
16-
list := fluent.MustBuildList(basicnode.Prototype.List, cids.Len(), func(la fluent.ListAssembler) {
16+
list := fluent.MustBuildList(basicnode.Prototype.List, int64(cids.Len()), func(la fluent.ListAssembler) {
1717
_ = cids.ForEach(func(c cid.Cid) error {
1818
la.AssembleValue().AssignLink(cidlink.Link{Cid: c})
1919
return nil

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ require (
2727
github.com/ipfs/go-merkledag v0.3.1
2828
github.com/ipfs/go-peertaskqueue v0.2.0
2929
github.com/ipfs/go-unixfs v0.2.4
30-
github.com/ipld/go-ipld-prime v0.5.1-0.20201021195245-109253e8a018
31-
github.com/ipld/go-ipld-prime-proto v0.1.0
30+
github.com/ipld/go-ipld-prime v0.7.0
31+
github.com/ipld/go-ipld-prime-proto v0.1.1
3232
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c
3333
github.com/libp2p/go-buffer-pool v0.0.2
3434
github.com/libp2p/go-libp2p v0.12.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,10 @@ github.com/ipfs/go-unixfs v0.2.4 h1:6NwppOXefWIyysZ4LR/qUBPvXd5//8J3jiMdvpbw6Lo=
274274
github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw=
275275
github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E=
276276
github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0=
277-
github.com/ipld/go-ipld-prime v0.5.1-0.20201021195245-109253e8a018 h1:RbRHv8epkmvBYA5cGfz68GUSbOgx5j/7ObLIl4Rsif0=
278-
github.com/ipld/go-ipld-prime v0.5.1-0.20201021195245-109253e8a018/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM=
279-
github.com/ipld/go-ipld-prime-proto v0.1.0 h1:j7gjqrfwbT4+gXpHwEx5iMssma3mnctC7YaCimsFP70=
280-
github.com/ipld/go-ipld-prime-proto v0.1.0/go.mod h1:11zp8f3sHVgIqtb/c9Kr5ZGqpnCLF1IVTNOez9TopzE=
277+
github.com/ipld/go-ipld-prime v0.7.0 h1:eigF1ZpaL1prbsKYVMqPLoPJqD/pzkQOe2j1uzvVg7w=
278+
github.com/ipld/go-ipld-prime v0.7.0/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM=
279+
github.com/ipld/go-ipld-prime-proto v0.1.1 h1:EX4yWYaIqSLwtVE30nxEcZDcvsWDtx1vImSG+XCJebY=
280+
github.com/ipld/go-ipld-prime-proto v0.1.1/go.mod h1:cI9NwYAUKCLUwqufoUjChISxuTEkaY2yvNYCRCuhRck=
281281
github.com/jackpal/gateway v1.0.5 h1:qzXWUJfuMdlLMtt0a3Dgt+xkWQiA5itDEITVJtuSwMc=
282282
github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA=
283283
github.com/jackpal/go-nat-pmp v1.0.1 h1:i0LektDkO1QlrTm/cSuP+PyBCDnYvjPLGl4LdWEMiaA=

selectorvalidator/selectorvalidator.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func init() {
5454
// SelectorValidator returns an OnRequestReceivedHook that only validates
5555
// requests if their selector only has no recursions that are greater than
5656
// maxAcceptedDepth
57-
func SelectorValidator(maxAcceptedDepth int) graphsync.OnIncomingRequestHook {
57+
func SelectorValidator(maxAcceptedDepth int64) graphsync.OnIncomingRequestHook {
5858
return func(p peer.ID, request graphsync.RequestData, hookActions graphsync.IncomingRequestHookActions) {
5959
err := ValidateMaxRecursionDepth(request.Selector(), maxAcceptedDepth)
6060
if err == nil {
@@ -65,10 +65,10 @@ func SelectorValidator(maxAcceptedDepth int) graphsync.OnIncomingRequestHook {
6565

6666
// ValidateMaxRecursionDepth examines the given selector node and verifies
6767
// recursive selectors are limited to the given fixed depth
68-
func ValidateMaxRecursionDepth(node ipld.Node, maxAcceptedDepth int) error {
68+
func ValidateMaxRecursionDepth(node ipld.Node, maxAcceptedDepth int64) error {
6969

7070
return traversal.WalkMatching(node, maxDepthSelector, func(progress traversal.Progress, visited ipld.Node) error {
71-
if visited.ReprKind() != ipld.ReprKind_Map || visited.Length() != 1 {
71+
if visited.Kind() != ipld.Kind_Map || visited.Length() != 1 {
7272
return ErrInvalidLimit
7373
}
7474
kn, v, _ := visited.MapIterator().Next()

testutil/chaintypes/ipldsch_minima.go

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)