Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v0.0.1 alpha.63 #59

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.0.1-alpha.63](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.62...v0.0.1-alpha.63) (2024-09-23)


### Bug Fixes

* manifest ([bb3eb79](https://github.com/DIG-Network/dig-chia-sdk/commit/bb3eb79cb96f4907438eca174d0802d380256e60))

### [0.0.1-alpha.62](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.61...v0.0.1-alpha.62) (2024-09-22)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dignetwork/dig-sdk",
"version": "0.0.1-alpha.62",
"version": "0.0.1-alpha.63",
"description": "",
"type": "commonjs",
"main": "./dist/index.js",
Expand Down
5 changes: 4 additions & 1 deletion src/DataIntegrityTree/DataIntegrityTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ class DataIntegrityTree {
const manifest = this._loadManifest();
if (manifest.length > 0) {
const latestRootHash = manifest[manifest.length - 1];
return this.deserializeTree(latestRootHash);
if (latestRootHash.length === 64) {
return this.deserializeTree(latestRootHash);
}
return new MerkleTree([], SHA256, { sortPairs: true });
} else {
return new MerkleTree([], SHA256, { sortPairs: true });
}
Expand Down
2 changes: 1 addition & 1 deletion src/DigNetwork/PropagationServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ export class PropagationServer {
await propagationServer.downloadFile(dataPath);
}

const dataStore = new DataStore(storeId);
const dataStore = DataStore.from(storeId);
await dataStore.generateManifestFile();

console.log(green(`✔ All files have been downloaded to ${storeId}.`));
Expand Down
Loading