Skip to content

Commit 155f2bf

Browse files
Merge pull request #167 from DIG-Network/release/v0.0.1-alpha.179
Release/v0.0.1 alpha.179
2 parents 7fe3a87 + 3d577d2 commit 155f2bf

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
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.179](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.178...v0.0.1-alpha.179) (2024-10-31)
6+
7+
8+
### Bug Fixes
9+
10+
* check if store exists in the Datastore.from constuctor ([822c354](https://github.com/DIG-Network/dig-chia-sdk/commit/822c354fd42deb6cdffe1e5e5f5341d9ed624a64))
11+
512
### [0.0.1-alpha.178](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.177...v0.0.1-alpha.178) (2024-10-31)
613

714

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.178",
3+
"version": "0.0.1-alpha.179",
44
"description": "",
55
"type": "commonjs",
66
"main": "./dist/index.js",

src/blockchain/DataStore.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ export class DataStore {
102102
}
103103

104104
public static from(storeId: string | Buffer, rootHash?: string): DataStore {
105+
if (!fs.existsSync(path.join(STORE_PATH, storeId.toString("hex")))) {
106+
throw new Error(`Store with ID ${storeId.toString("hex")} does not exist.`);
107+
}
108+
105109
const existingTreeOptions: DataIntegrityTreeOptions = {
106110
storageMode: "local",
107111
storeDir: STORE_PATH,

0 commit comments

Comments
 (0)