From 2811332dcedf5a6a9d2a34b54c3720387ba26df8 Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Thu, 9 Nov 2023 10:30:58 -0800 Subject: [PATCH] only traverse cbor blocks when running mst diff --- carstore/bs.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/carstore/bs.go b/carstore/bs.go index 7a8bbedb2..7feb9d697 100644 --- a/carstore/bs.go +++ b/carstore/bs.go @@ -905,6 +905,10 @@ func BlockDiff(ctx context.Context, bs blockstore.Blockstore, oldroot cid.Cid, n } if err := cbg.ScanForLinks(bytes.NewReader(oblk.RawData()), func(lnk cid.Cid) { + if lnk.Prefix().Codec != cid.DagCBOR { + return + } + if !keepset[lnk] { dropset[lnk] = true queue = append(queue, lnk)