diff --git a/merkledag/utils/diff.go b/merkledag/utils/diff.go index 8605c470c..87b27d20c 100644 --- a/merkledag/utils/diff.go +++ b/merkledag/utils/diff.go @@ -7,8 +7,8 @@ import ( dag "github.com/ipfs/go-ipfs/merkledag" - node "github.com/ipfs/go-ipld-node" cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid" + node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format" ) const ( diff --git a/merkledag/utils/diffenum.go b/merkledag/utils/diffenum.go index bc7e09321..28229a4fa 100644 --- a/merkledag/utils/diffenum.go +++ b/merkledag/utils/diffenum.go @@ -6,8 +6,8 @@ import ( mdag "github.com/ipfs/go-ipfs/merkledag" - node "github.com/ipfs/go-ipld-node" cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid" + node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format" ) // DiffEnumerate fetches every object in the graph pointed to by 'to' that is @@ -55,13 +55,15 @@ func DiffEnumerate(ctx context.Context, dserv node.NodeGetter, from, to *cid.Cid return nil } +// if both bef and aft are not nil, then that signifies bef was replaces with aft. +// if bef is nil and aft is not, that means aft was newly added +// if aft is nil and bef is not, that means bef was deleted type diffpair struct { bef, aft *cid.Cid } -// getLinkDiff returns a changset (minimum edit distance style) between nodes -// 'a' and 'b'. Currently does not log deletions as our usecase doesnt call for -// this. +// getLinkDiff returns a changeset between nodes 'a' and 'b'. Currently does +// not log deletions as our usecase doesnt call for this. func getLinkDiff(a, b node.Node) []diffpair { have := make(map[string]*node.Link) names := make(map[string]*node.Link) diff --git a/merkledag/utils/diffenum_test.go b/merkledag/utils/diffenum_test.go index 686fdc35b..45a0e178b 100644 --- a/merkledag/utils/diffenum_test.go +++ b/merkledag/utils/diffenum_test.go @@ -8,8 +8,8 @@ import ( dag "github.com/ipfs/go-ipfs/merkledag" mdtest "github.com/ipfs/go-ipfs/merkledag/test" - node "github.com/ipfs/go-ipld-node" cid "gx/ipfs/QmYhQaCYEcaPPjxJX7YcPcVKkQfRy6sJ7B3XmGFk82XYdQ/go-cid" + node "gx/ipfs/Qmb3Hm9QDFmfYuET4pu7Kyg8JV78jFa1nvZx5vnCZsK4ck/go-ipld-format" ) func buildNode(name string, desc map[string]ndesc, out map[string]node.Node) node.Node { diff --git a/pin/pin.go b/pin/pin.go index 8de1780f0..482d070fd 100644 --- a/pin/pin.go +++ b/pin/pin.go @@ -90,7 +90,7 @@ type Pinner interface { // Update updates a recursive pin from one cid to another // this is more efficient than simply pinning the new one and unpinning the // old one - Update(context.Context, *cid.Cid, *cid.Cid, bool) error + Update(ctx context.Context, from, to *cid.Cid, unpin bool) error // Check if a set of keys are pinned, more efficient than // calling IsPinned for each key