From 74f645a098989275c5b4b0e16d7799f4351a8e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Tue, 16 Nov 2021 12:58:52 +0100 Subject: [PATCH] retrieval: Fix parseDagSpec root check --- node/impl/client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/impl/client/client.go b/node/impl/client/client.go index a4d626206..8ac067779 100644 --- a/node/impl/client/client.go +++ b/node/impl/client/client.go @@ -1078,7 +1078,7 @@ func parseDagSpec(ctx context.Context, root cid.Cid, dsp []api.DagSpec, ds forma return nil, xerrors.Errorf("error while locating partial retrieval sub-root: %w", err) } - if out[i].root == cid.Undef { + if newRoot == cid.Undef { return nil, xerrors.Errorf("path selection does not match a node within %s", root) }