Skip to content

Commit

Permalink
Merge pull request #98 from DIG-Network/release/v0.0.1-alpha.104
Browse files Browse the repository at this point in the history
Release/v0.0.1 alpha.104
  • Loading branch information
MichaelTaylor3D authored Oct 5, 2024
2 parents 4a406b2 + 92c1017 commit 9797acd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.104](https://github.com/DIG-Network/dig-propagation-server/compare/v0.0.1-alpha.103...v0.0.1-alpha.104) (2024-10-05)

### [0.0.1-alpha.103](https://github.com/DIG-Network/dig-propagation-server/compare/v0.0.1-alpha.102...v0.0.1-alpha.103) (2024-10-05)

### [0.0.1-alpha.102](https://github.com/DIG-Network/dig-propagation-server/compare/v0.0.1-alpha.101...v0.0.1-alpha.102) (2024-10-05)
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": "dig-propagation-server",
"version": "0.0.1-alpha.103",
"version": "0.0.1-alpha.104",
"description": "",
"type": "commonjs",
"main": "./dist/index.js",
Expand Down
5 changes: 3 additions & 2 deletions src/controllers/storeController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ export const syncStoreFromRequestor = async (
return;
}

const allStores = await DataStore.getAllStores();
const allStores = DataStore.getAllStores();
const allStoreIds = allStores.map((store) => store.StoreId);

if (!allStores.includes(storeId)) {
if (!allStoreIds.includes(storeId)) {
res.status(400).json({
error: `Store ${storeId} does not exist.`,
});
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/sync_stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const checkedPeersMap: Map<string, Set<string>> = new Map();
const processPeer = async (peerIp: string, storeId: string, rootHash: string, checkedPeers: Set<string>): Promise<void> => {
try {
const digPeer = new DigPeer(peerIp, storeId);
const hasRootHash = await withTimeout(digPeer.contentServer.hasRootHash(rootHash), 5000, "`Dig Peer: ${peerIp} took to long to respond to head request`");
const hasRootHash = await withTimeout(digPeer.contentServer.hasRootHash(rootHash), 5000, `Dig Peer: ${peerIp} took to long to respond to head request`);

if (hasRootHash) {
console.log(`Dig Peer ${peerIp} already has rootHash ${rootHash}. Marking as checked.`);
Expand Down

0 comments on commit 9797acd

Please sign in to comment.