Skip to content

Commit

Permalink
Merge pull request #121 from DIG-Network/release/v0.0.1-alpha.127
Browse files Browse the repository at this point in the history
Release/v0.0.1 alpha.127
  • Loading branch information
MichaelTaylor3D authored Oct 7, 2024
2 parents 940b21c + d5c0efd commit fbd1b91
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 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.127](https://github.com/DIG-Network/dig-propagation-server/compare/v0.0.1-alpha.126...v0.0.1-alpha.127) (2024-10-07)

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

### [0.0.1-alpha.125](https://github.com/DIG-Network/dig-propagation-server/compare/v0.0.1-alpha.124...v0.0.1-alpha.125) (2024-10-07)
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.126",
"version": "0.0.1-alpha.127",
"description": "",
"type": "commonjs",
"main": "./dist/index.js",
Expand Down
14 changes: 9 additions & 5 deletions src/controllers/merkleTreeController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
DataIntegrityTree,
getFilePathFromSha256,
Environment,
DigNetwork
DigNetwork,
} from "@dignetwork/dig-sdk";
import { promisify } from "util";
import { getStorageLocation } from "../utils/storage";
Expand All @@ -22,7 +22,7 @@ import Busboy from "busboy";
import fsExtra from "fs-extra";
import { HashingStream } from "../utils/HasingStream";
import * as zlib from "zlib";
import requestIp from 'request-ip';
import requestIp from "request-ip";

const digFolderPath = getStorageLocation();
const streamPipeline = promisify(require("stream").pipeline);
Expand Down Expand Up @@ -127,7 +127,7 @@ async function merkleIntegrityCheck(
if (Environment.DEBUG) {
console.log("Integrity check result:", integrity);
}

return integrity;
}

Expand Down Expand Up @@ -698,7 +698,7 @@ export const commitUpload = async (
if (session.roothash) {
DigNetwork.pingNetworkOfUpdate(storeId, session.roothash);
}

res.status(200).json({
message: `Upload for DataStore ${storeId} under session ${sessionId} committed successfully.`,
});
Expand Down Expand Up @@ -828,7 +828,11 @@ export const fetchFile = async (req: Request, res: Response): Promise<void> => {
res.status(200);

const clientIp = requestIp.getClientIp(req);
console.log(`Fetch Request from: ${clientIp}, StoreId: ${storeId}`);
console.log(
`Fetch Request from: ${clientIp}, StoreId: ${storeId}, DataPath: ${
dataPath.length > 10 ? "..." + dataPath.slice(-10) : dataPath
}`
);

// Stream the file to the response
const fileStream = fs.createReadStream(filePath);
Expand Down

0 comments on commit fbd1b91

Please sign in to comment.