Skip to content

Commit

Permalink
Modify getChaincodeCount functionality to get Distinct CC Count
Browse files Browse the repository at this point in the history
Signed-off-by: Viraj Shelar <shelarvs11@gmail.com>
  • Loading branch information
shelarvs authored and ArchanaArige committed Apr 11, 2023
1 parent d7c74ee commit 18f1b7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/persistence/fabric/MetricService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class MetricService {
*/
getChaincodeCount(network_name: any, channel_genesis_hash: any) {
return this.sql.getRowsBySQlCase(
'select count(1) c from chaincodes where channel_genesis_hash=$1 and network_name=$2 ',
'select count(DISTINCT name) c from chaincodes where channel_genesis_hash=$1 and network_name=$2 ',
[channel_genesis_hash, network_name]
);
}
Expand Down

0 comments on commit 18f1b7e

Please sign in to comment.