Skip to content

Commit

Permalink
Merge pull request #58 from DIG-Network/release/v0.0.1-alpha.62
Browse files Browse the repository at this point in the history
Release/v0.0.1 alpha.62
  • Loading branch information
MichaelTaylor3D authored Sep 22, 2024
2 parents 0d6d560 + 2bb3426 commit a0e370a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
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.62](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.61...v0.0.1-alpha.62) (2024-09-22)


### Bug Fixes

* manifest file gen ([cf406aa](https://github.com/DIG-Network/dig-chia-sdk/commit/cf406aab3413af5e6925442a1e9464f1d05879f6))

### [0.0.1-alpha.61](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.60...v0.0.1-alpha.61) (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.61",
"version": "0.0.1-alpha.62",
"description": "",
"type": "commonjs",
"main": "./dist/index.js",
Expand Down
3 changes: 3 additions & 0 deletions src/DigNetwork/PropagationServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,9 @@ export class PropagationServer {
await propagationServer.downloadFile(dataPath);
}

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

console.log(green(`✔ All files have been downloaded to ${storeId}.`));
}
}
7 changes: 5 additions & 2 deletions src/blockchain/DataStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,14 @@ export class DataStore {

// Generates a fresh manifest file based on the current root history
// and what is currently on disk
public async generateManifestFile(): Promise<void> {
public async generateManifestFile(folderPath?: string): Promise<void> {
if (!folderPath) {
folderPath = path.join(STORE_PATH, this.storeId, "data");
}
const rootHistory = await this.getRootHistory();
// Need this for the dataintegrity tree to work properly
fs.writeFileSync(
path.join(STORE_PATH, this.storeId, "manifest.dat"),
path.join(folderPath, "manifest.dat"),
rootHistory
.filter((root) => root.synced)
.map((root) => root.root_hash)
Expand Down

0 comments on commit a0e370a

Please sign in to comment.