private static bool CheckInstalledChaincode(HFClient client, Peer peer, string ccName, string ccPath, string ccVersion) { Util.COut("Checking installed chaincode: {0}, at version: {1}, on peer: {2}", ccName, ccVersion, peer.Name); List <ChaincodeInfo> ccinfoList = client.QueryInstalledChaincodes(peer); bool found = false; foreach (ChaincodeInfo ccifo in ccinfoList) { if (ccPath != null) { found = ccName.Equals(ccifo.Name) && ccPath.Equals(ccifo.Path) && ccVersion.Equals(ccifo.Version); if (found) { break; } } found = ccName.Equals(ccifo.Name) && ccVersion.Equals(ccifo.Version); if (found) { break; } } return(found); }