From 16a5e8e13bab70f7951195cda556b629ae9cab7e Mon Sep 17 00:00:00 2001 From: Kejie Zhang Date: Thu, 6 Sep 2018 12:42:24 +0800 Subject: [PATCH] drop external dep and update copy function --- daghelpers.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/daghelpers.go b/daghelpers.go index 6536bb7..8219306 100644 --- a/daghelpers.go +++ b/daghelpers.go @@ -95,13 +95,6 @@ func Copy(ctx context.Context, from, to DAGService, root *cid.Cid) error { return err } links := node.Links() - if len(links) == 0 { - err := to.Add(ctx, node) - if err != nil { - return err - } - return nil - } for _, link := range links { err := Copy(ctx, from, to, link.Cid) if err != nil {