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

Commit fff6807

Browse files
committed
update to the latest go-merkledag, enable concurrent fetching of the pinset
1 parent fb72393 commit fff6807

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require (
1616
github.com/ipfs/go-ipld-cbor v0.0.2
1717
github.com/ipfs/go-ipld-format v0.0.2
1818
github.com/ipfs/go-log v0.0.1
19-
github.com/ipfs/go-merkledag v0.2.0
19+
github.com/ipfs/go-merkledag v0.2.1
2020
github.com/ipfs/go-verifcid v0.0.1
2121
github.com/libp2p/go-libp2p-core v0.0.3
2222
github.com/libp2p/go-libp2p-testing v0.0.4

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ github.com/ipfs/go-log v0.0.1 h1:9XTUN/rW64BCG1YhPK9Hoy3q8nr4gOmHHBpgFdfw6Lc=
102102
github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM=
103103
github.com/ipfs/go-merkledag v0.2.0 h1:EAjIQCgZ6/DnOAlKY3+59j72FD9BsYtNaCRSmN0xIbU=
104104
github.com/ipfs/go-merkledag v0.2.0/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk=
105+
github.com/ipfs/go-merkledag v0.2.1 h1:rHJeuK6+cRzvY4uA9QMPFq9t6I2DKV0oeaKNecnoeeg=
106+
github.com/ipfs/go-merkledag v0.2.1/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk=
105107
github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg=
106108
github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY=
107109
github.com/ipfs/go-peertaskqueue v0.1.0 h1:bpRbgv76eT4avutNPDFZuCPOQus6qTgurEYxfulgZW4=

simple/reprovide.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

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

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

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

0 commit comments

Comments
 (0)