Skip to content

Commit

Permalink
Fix ill-formed response by /api/peersStatus (hyperledger-labs#297)
Browse files Browse the repository at this point in the history
* Fix ill-formed response by /api/peersStatus

Signed-off-by: kaushikkumarbora <[email protected]>

* linted

Signed-off-by: kaushikkumarbora <[email protected]>
  • Loading branch information
kaushikkumarbora authored May 12, 2022
1 parent 96c18fc commit 9e0a323
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/platform/fabric/Proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,14 @@ export class Proxy {
node.ledger_height_unsigned = peer.ledgerHeight.unsigned;
}
}
} else {
// Sometime 'peers_by_org' property is not included in discover result
}
// Sometime 'peers_by_org' property is not included in discover result
if(typeof node.ledger_height_low === 'undefined')
node.ledger_height_low = '-';
if(typeof node.ledger_height_high === 'undefined')
node.ledger_height_high = '-';
if(typeof node.ledger_height_unsigned === 'undefined')
node.ledger_height_unsigned = '-';
}
peers.push(node);
} else if (node.peer_type === 'ORDERER') {
node.status = 'DOWN';
Expand Down

0 comments on commit 9e0a323

Please sign in to comment.