From 9e2284b1a2b6ba65b8cc2dadd7f55514e2ba0433 Mon Sep 17 00:00:00 2001 From: Steven Allen <steven@stebalien.com> Date: Thu, 11 Jul 2019 18:21:25 -0700 Subject: [PATCH] switch to new merkledag walk functions EnumerateChildrenAsync has been renamed to WalkParallel to reflect the fact that: 1. It visits the root. 2. It's parallel, not async. To mirror this change, EnumerateChildren has also been renamed to Walk and now behaves the same (except that it's not parallel). --- gc/gc.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gc/gc.go b/gc/gc.go index bf8b7b1..7190b1e 100644 --- a/gc/gc.go +++ b/gc/gc.go @@ -170,10 +170,8 @@ func Descendants(ctx context.Context, getLinks dag.GetLinks, set *cid.Set, roots } for _, c := range roots { - set.Add(c) - - // EnumerateChildren recursively walks the dag and adds the keys to the given set - err := dag.EnumerateChildren(ctx, verifyGetLinks, c, set.Visit) + // Walk recursively walks the dag and adds the keys to the given set + err := dag.Walk(ctx, verifyGetLinks, c, set.Visit) if err != nil { err = verboseCidError(err) -- GitLab