Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
update to the latest go-merkledag, enable concurrent fetching of the …
Browse files Browse the repository at this point in the history
…pinset
  • Loading branch information
MichaelMure committed Jul 24, 2019
1 parent fb72393 commit fff6807
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/ipfs/go-ipld-cbor v0.0.2
github.com/ipfs/go-ipld-format v0.0.2
github.com/ipfs/go-log v0.0.1
github.com/ipfs/go-merkledag v0.2.0
github.com/ipfs/go-merkledag v0.2.1
github.com/ipfs/go-verifcid v0.0.1
github.com/libp2p/go-libp2p-core v0.0.3
github.com/libp2p/go-libp2p-testing v0.0.4
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ github.com/ipfs/go-log v0.0.1 h1:9XTUN/rW64BCG1YhPK9Hoy3q8nr4gOmHHBpgFdfw6Lc=
github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM=
github.com/ipfs/go-merkledag v0.2.0 h1:EAjIQCgZ6/DnOAlKY3+59j72FD9BsYtNaCRSmN0xIbU=
github.com/ipfs/go-merkledag v0.2.0/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk=
github.com/ipfs/go-merkledag v0.2.1 h1:rHJeuK6+cRzvY4uA9QMPFq9t6I2DKV0oeaKNecnoeeg=
github.com/ipfs/go-merkledag v0.2.1/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk=
github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg=
github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY=
github.com/ipfs/go-peertaskqueue v0.1.0 h1:bpRbgv76eT4avutNPDFZuCPOQus6qTgurEYxfulgZW4=
Expand Down
4 changes: 2 additions & 2 deletions simple/reprovide.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

var logR = logging.Logger("reprovider.simple")

//KeyChanFunc is function streaming CIDs to pass to content routing
// KeyChanFunc is function streaming CIDs to pass to content routing
type KeyChanFunc func(context.Context) (<-chan cid.Cid, error)
type doneFunc func(error)

Expand Down Expand Up @@ -216,7 +216,7 @@ func pinSet(ctx context.Context, pinning Pinner, dag ipld.DAGService, onlyRoots
if onlyRoots {
set.Visitor(ctx)(key)
} else {
err := merkledag.Walk(ctx, merkledag.GetLinksWithDAG(dag), key, set.Visitor(ctx))
err := merkledag.Walk(ctx, merkledag.GetLinksWithDAG(dag), key, set.Visitor(ctx), merkledag.Concurrent(), merkledag.WithRoot())
if err != nil {
logR.Errorf("reprovide indirect pins: %s", err)
return
Expand Down

0 comments on commit fff6807

Please sign in to comment.