Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: unhealthy nodes #1611

Merged
merged 2 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v2.26.0-beta.2

## What's Changed
* Fix: unhealthy nodes by @petreze in https://github.com/hashgraph/hedera-sdk-js/pull/1611

## v2.26.0-beta.1

## What's Changed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hashgraph/sdk",
"version": "2.26.0-beta.1",
"version": "2.26.0-beta.2",
"description": "Hedera™ Hashgraph SDK",
"types": "./lib/index.d.ts",
"main": "./lib/index.cjs",
Expand Down
5 changes: 4 additions & 1 deletion src/client/ManagedNetwork.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,10 @@ export default class ManagedNetwork {
// `this._healthyNodes.length` times. This can result in a shorter
// list than `count`, but that is much better than running forever
for (let i = 0; i < this._healthyNodes.length; i++) {
if (nodes.length == count - this._unhealthyNodesCount) {
if (
nodes.length == count - this._unhealthyNodesCount &&
nodes.length !== 0
) {
break;
}

Expand Down
2 changes: 1 addition & 1 deletion src/transaction/Transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,7 @@ export default class Transaction extends Executable {
}

/**
* Make a signed tranaction given a node account ID
* Make a signed transaction given a node account ID
*
* @internal
* @param {?AccountId} nodeId
Expand Down