use of org.hyperledger.fabric.protos.msp.MspConfig in project fabric-sdk-java by hyperledger.
the class Channel method traverseConfigGroupsMSP.
private Map<String, MSP> traverseConfigGroupsMSP(String name, ConfigGroup configGroup, Map<String, MSP> msps) throws InvalidProtocolBufferException {
ConfigValue mspv = configGroup.getValuesMap().get("MSP");
if (null != mspv) {
if (!msps.containsKey(name)) {
MspConfig.MSPConfig mspConfig = MspConfig.MSPConfig.parseFrom(mspv.getValue());
MspConfig.FabricMSPConfig fabricMSPConfig = MspConfig.FabricMSPConfig.parseFrom(mspConfig.getConfig());
msps.put(name, new MSP(name, fabricMSPConfig));
}
}
for (Map.Entry<String, ConfigGroup> gm : configGroup.getGroupsMap().entrySet()) {
traverseConfigGroupsMSP(gm.getKey(), gm.getValue(), msps);
}
return msps;
}
Aggregations