Skip to content

Commit 6523fca

Browse files
Merge pull request #75 from DIG-Network/release/v0.0.1-alpha.81
Release/v0.0.1 alpha.81
2 parents 79d074e + 39720df commit 6523fca

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
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.
44

5+
### [0.0.1-alpha.81](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.80...v0.0.1-alpha.81) (2024-09-25)
6+
7+
8+
### Bug Fixes
9+
10+
* download store ([788c86b](https://github.com/DIG-Network/dig-chia-sdk/commit/788c86b295a3747150ffc4bf51be9d1af6562968))
11+
* download store ([ff94f99](https://github.com/DIG-Network/dig-chia-sdk/commit/ff94f99ae4556f26cc8c976e4e803618227f6429))
12+
513
### [0.0.1-alpha.80](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.79...v0.0.1-alpha.80) (2024-09-24)
614

715

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dignetwork/dig-sdk",
3-
"version": "0.0.1-alpha.80",
3+
"version": "0.0.1-alpha.81",
44
"description": "",
55
"type": "commonjs",
66
"main": "./dist/index.js",

src/DigNetwork/DigNetwork.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,23 +169,20 @@ export class DigNetwork {
169169
continue;
170170
}
171171

172-
try {
173-
// Download the store root and associated data
174-
await selectedPeer.downloadStoreRoot(rootInfo.root_hash);
175-
} catch (error) {
176-
break;
177-
}
172+
// Download the store root and associated data
173+
await selectedPeer.downloadStoreRoot(rootInfo.root_hash);
178174

179175
// Clear the blacklist upon successful download
180176
peerBlackList = [];
181177

182178
// Break after successful download to proceed to next root hash
183179
break;
184180
} catch (error: any) {
185-
console.error(
186-
`Error downloading from peer ${selectedPeer?.IpAddress}. Retrying with another peer.`,
187-
error
188-
);
181+
if (error.message)
182+
console.error(
183+
`Error downloading from peer ${selectedPeer?.IpAddress}. Retrying with another peer.`,
184+
error
185+
);
189186
if (selectedPeer) {
190187
peerBlackList.push(selectedPeer.IpAddress); // Blacklist and retry
191188
}

src/DigNetwork/PropagationServer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ export class PropagationServer {
687687

688688
// Integrity check for the downloaded files was done during the download
689689
// Here we want to make sure we got all the files or we reject the download session
690-
for (const [fileKey, fileData] of Object.entries(root.files)) {
690+
/*for (const [fileKey, fileData] of Object.entries(root.files)) {
691691
const dataPath = getFilePathFromSha256(
692692
(fileData as any).sha256,
693693
"data"
@@ -697,7 +697,7 @@ export class PropagationServer {
697697
if (!fs.existsSync(path.join(downloadPath, dataPath))) {
698698
throw new Error(`Missing file!: ${Buffer.from(fileKey, "utf-8")}, aborting session.`);
699699
}
700-
}
700+
}*/
701701

702702
// After all downloads are complete, copy from temp directory to the main directory
703703
const destinationDir = path.join(STORE_PATH, storeId);

0 commit comments

Comments
 (0)