Skip to content

Commit

Permalink
only traverse cbor blocks when running mst diff
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed Nov 9, 2023
1 parent fa7db1c commit 2811332
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions carstore/bs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2811332

Please sign in to comment.