diff --git a/CHANGELOG.md b/CHANGELOG.md index 4da687f..a9f4c9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ 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.115](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.114...v0.0.1-alpha.115) (2024-10-03) + ### [0.0.1-alpha.114](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.113...v0.0.1-alpha.114) (2024-10-03) ### [0.0.1-alpha.113](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.112...v0.0.1-alpha.113) (2024-10-03) diff --git a/package-lock.json b/package-lock.json index c064a45..b081265 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dignetwork/dig-sdk", - "version": "0.0.1-alpha.114", + "version": "0.0.1-alpha.115", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@dignetwork/dig-sdk", - "version": "0.0.1-alpha.114", + "version": "0.0.1-alpha.115", "license": "ISC", "dependencies": { "@dignetwork/datalayer-driver": "^0.1.29", diff --git a/package.json b/package.json index 5130672..b1e3133 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dignetwork/dig-sdk", - "version": "0.0.1-alpha.114", + "version": "0.0.1-alpha.115", "description": "", "type": "commonjs", "main": "./dist/index.js", diff --git a/src/blockchain/StoreInfoCacheUpdater.ts b/src/blockchain/StoreInfoCacheUpdater.ts index 6b1afca..58754e9 100644 --- a/src/blockchain/StoreInfoCacheUpdater.ts +++ b/src/blockchain/StoreInfoCacheUpdater.ts @@ -1,6 +1,6 @@ import fs from "fs"; import { FullNodePeer } from "./FullNodePeer"; -import { FileCache, USER_DIR_PATH, DIG_FOLDER_PATH } from "../utils"; +import { FileCache, USER_DIR_PATH } from "../utils"; import { DataStoreSerializer } from "./DataStoreSerializer"; import { withTimeout } from "../utils"; import * as lockfile from "proper-lockfile"; @@ -27,11 +27,11 @@ export class StoreInfoCacheUpdater { this.storeCoinCache = new FileCache(`stores`, USER_DIR_PATH); // Construct lock file path using the path module - this.lockFilePath = path.join(DIG_FOLDER_PATH, "store-info-cache.lock"); + this.lockFilePath = path.join(USER_DIR_PATH, "store-info-cache.lock"); - if (fs.existsSync(this.lockFilePath)) { - console.log("Removing existing lock file"); - fs.unlinkSync(this.lockFilePath); + const lockDir = path.dirname(this.lockFilePath); + if (!fs.existsSync(lockDir)) { + fs.mkdirSync(lockDir, { recursive: true }); } // Start monitors for existing storeIds