Skip to content

Commit

Permalink
Merge pull request #119 from DIG-Network/release/v0.0.1-alpha.130
Browse files Browse the repository at this point in the history
Release/v0.0.1 alpha.130
  • Loading branch information
MichaelTaylor3D authored Oct 4, 2024
2 parents ebec380 + 7b0666e commit 753922a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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.130](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.129...v0.0.1-alpha.130) (2024-10-04)


### Features

* add timeout to pingupdate ([f95e4cf](https://github.com/DIG-Network/dig-chia-sdk/commit/f95e4cf9285b23e296e9f998d137443792d80e04))

### [0.0.1-alpha.129](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.128...v0.0.1-alpha.129) (2024-10-04)


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": "@dignetwork/dig-sdk",
"version": "0.0.1-alpha.129",
"version": "0.0.1-alpha.130",
"description": "",
"type": "commonjs",
"main": "./dist/index.js",
Expand Down
8 changes: 6 additions & 2 deletions src/DigNetwork/DigNetwork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as path from "path";
import { DigPeer } from "./DigPeer";
import { DataStore, ServerCoin } from "../blockchain";
import { DIG_FOLDER_PATH } from "../utils/config";
import { RootHistoryItem } from "../types";
import { withTimeout } from "../utils";
import { promisify } from "util";

const rename = promisify(fs.rename);
Expand Down Expand Up @@ -111,7 +111,11 @@ export class DigNetwork {
const digPeers = await serverCoin.sampleCurrentEpoch(10);
for (const peer of digPeers) {
const digPeer = new DigPeer(peer, storeId);
await digPeer.propagationServer.pingUpdate(rootHash);
await withTimeout(
digPeer.propagationServer.pingUpdate(rootHash),
5000,
`headKey timed out for peer ${digPeer.IpAddress}`
)
}
}

Expand Down

0 comments on commit 753922a

Please sign in to comment.