Skip to content

Commit

Permalink
fix: refresh nodeClient for multiple nodes
Browse files Browse the repository at this point in the history
Signed-off-by: Ivo Yankov <[email protected]>
  • Loading branch information
Ivo-Yankov committed Dec 11, 2024
1 parent 65ac05b commit 019cb2b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/commands/node/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1282,8 +1282,11 @@ export class NodeCommandTasks {

const nodeId = Templates.nodeIdFromNodeAlias(config.nodeAlias) - 1;
self.logger.info(`nodeId: ${nodeId}, config.newAccountNumber: ${config.newAccountNumber}`);
// await self.accountManager.refreshNodeClient(config.namespace, config.nodeAlias);
// config.nodeClient = await this.accountManager.loadNodeClient(config.namespace);

if (config.existingNodeAliases.length > 1) {
await self.accountManager.refreshNodeClient(config.namespace, config.nodeAlias);
config.nodeClient = await this.accountManager.loadNodeClient(config.namespace);
}

try {
let nodeUpdateTx = new NodeUpdateTransaction().setNodeId(nodeId);
Expand Down

0 comments on commit 019cb2b

Please sign in to comment.