filecoin-project / lassie

A minimal universal retrieval client library for IPFS and Filecoin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use multihash, not CID, when doing internal look-ups and traversal comparisons

rvagg opened this issue · comments

Needs a bit of an audit--make sure that all our CARs are using multihash lookups, and then whenever we do traversal checking ourselves, we need to compare multihash bytes. One stand-out is:

if blk.Cid() != expected {

Lots of HTTP retrieval failures that look like:

unexpected block in CAR: bafybeievludxil5gbgsz2pxp6udgf3w6tv6jenfiqstpcgtxpdt2yueexe != QmYPhjQTJmwtMGGRrxQc8dCsFKgE1U6hXzRpYEviaD3AcQ

But they are the same multihash .. we should be OK with that and let others up the chain be concerned with the discrepancy.

There's a bigger question of how we have so much data like this, but that's no really ours to answer I think.

+1 makes sense!

Included some of this work in #426 so I'm calling this done