Skip to content

Commit 028bc03

Browse files
committed
pin cmd: fix pinLsAll context use
License: MIT Signed-off-by: Łukasz Magiera <[email protected]>
1 parent 0c83696 commit 028bc03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/commands/pin.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ Example:
307307
if len(req.Arguments()) > 0 {
308308
keys, err = pinLsKeys(req.Context(), req.Arguments(), typeStr, n)
309309
} else {
310-
keys, err = pinLsAll(typeStr, n)
310+
keys, err = pinLsAll(req.Context(), typeStr, n)
311311
}
312312

313313
if err != nil {
@@ -539,7 +539,7 @@ func pinLsKeys(ctx context.Context, args []string, typeStr string, n *core.IpfsN
539539
return keys, nil
540540
}
541541

542-
func pinLsAll(typeStr string, n *core.IpfsNode) (map[string]RefKeyObject, error) {
542+
func pinLsAll(ctx context.Context, typeStr string, n *core.IpfsNode) (map[string]RefKeyObject, error) {
543543

544544
keys := make(map[string]RefKeyObject)
545545

@@ -557,7 +557,7 @@ func pinLsAll(typeStr string, n *core.IpfsNode) (map[string]RefKeyObject, error)
557557
if typeStr == "indirect" || typeStr == "all" {
558558
set := cid.NewSet()
559559
for _, k := range n.Pinning.RecursiveKeys() {
560-
err := dag.EnumerateChildren(n.Context(), dag.GetLinksWithDAG(n.DAG), k, set.Visit)
560+
err := dag.EnumerateChildren(ctx, dag.GetLinksWithDAG(n.DAG), k, set.Visit)
561561
if err != nil {
562562
return nil, err
563563
}

0 commit comments

Comments
 (0)