Hello, I'm delighted to see the project you've written. It's been quite helpful for my needs. However, I've encountered an issue. When I use your code to calculate the CID for a large file (exceeding 256KB), the CID generated doesn't match the one obtained by directly uploading the file to IPFS. I understand that IPFS processes large files by dividing them into 256KB blocks. Have you encountered this issue as well?
Here is the code:
@Test
public void encodeV0Test() throws IOException {
String fp = "/tmp/asset.so";
Path path = Paths.get(fp);
Multihash multihash = Cid.encode(path);
// This is the CID obtained by uploading it to IPFS.
String expected = "QmRx37BBhLbGBhAhGzGDQaQDATyjReZni9cEY5BGtApkcf";
assertEquals("Hashes is not equals",
expected, multihash.toString());
}
Here is result:
org.junit.ComparisonFailure: Hashes is not equals
Expected :QmRx37BBhLbGBhAhGzGDQaQDATyjReZni9cEY5BGtApkcf
Actual :QmUggY5zHh8U2WvRV8X1s4W2kZF6avUivQsXSX53dFcVDL
If possible, could you provide me with code that can calculate a v1 version CID for large files? I would greatly appreciate it.
Hello, I'm delighted to see the project you've written. It's been quite helpful for my needs. However, I've encountered an issue. When I use your code to calculate the CID for a large file (exceeding 256KB), the CID generated doesn't match the one obtained by directly uploading the file to IPFS. I understand that IPFS processes large files by dividing them into 256KB blocks. Have you encountered this issue as well?
Here is the code:
Here is result:
If possible, could you provide me with code that can calculate a v1 version CID for large files? I would greatly appreciate it.