Not a valid CID; blockstore-datastore-adapter #3852
Description
-
Version:
{
"version": "0.10.4",
"repo": "10",
"commit": "",
"interface-ipfs-core": "^0.150.1"
} -
Platform:
Ubuntu x64 - Chromium Brave -
Subsystem:
blockstore-datastore-adapter
Severity:
Low - An optional functionality does not work.
Description:
We have browser tests in orbit-db that bundle orbit-db and use the provided ipfs bundle. the issue is that they use different instances of the CID class due to being bundled separately. This breaks some ipfs methods that run https://github.com/ipfs/js-blockstore-datastore-adapter/blob/b3592d6ba5709e885eeff4a5ecd8ddc09df03d41/src/index.js#L23 .
If we need to change how we've been bundling the tests that's fine. There isn't a non-hacky way i know of to get the same CID class the ipfs instance is using without having access to the IPFS factory.
Steps to reproduce the error:
git clone https://github.com/orbitdb/orbit-db.git &&
cd orbit-db &&
git checkout upgrade-ipfs &&
npm install &&
npm run test:browser-multiple-tabs
you can open test/browser/index.html to run the code in the browser
related:
orbitdb/orbitdb#913 (comment)