Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.configSleepAfterJoinChannel = ConfigUtil.get(ConfigUtil.keys.Fabric.SleepAfter.JoinChannel, 3000);
this.configSleepAfterInstantiateChaincode = ConfigUtil.get(ConfigUtil.keys.Fabric.SleepAfter.InstantiateChaincode, 5000);
this.configVerifyProposalResponse = ConfigUtil.get(ConfigUtil.keys.Fabric.Verify.ProposalResponse, true);
this.configVerifyReadWriteSets = ConfigUtil.get(ConfigUtil.keys.Fabric.Verify.ReadWriteSets, true);
this.configLatencyThreshold = ConfigUtil.get(ConfigUtil.keys.Fabric.LatencyThreshold, 1.0);
this.configOverwriteGopath = ConfigUtil.get(ConfigUtil.keys.Fabric.OverwriteGopath, true);
this.configChaincodeInstantiateTimeout = ConfigUtil.get(ConfigUtil.keys.Fabric.Timeout.ChaincodeInstantiate, 300000);
this.configChaincodeInstantiateEventTimeout = ConfigUtil.get(ConfigUtil.keys.Fabric.Timeout.ChaincodeInstantiateEvent, 300000);
this.configDefaultTimeout = ConfigUtil.get(ConfigUtil.keys.Fabric.Timeout.InvokeOrQuery, 60000);
this.configClientBasedLoadBalancing = ConfigUtil.get(ConfigUtil.keys.Fabric.LoadBalancing, 'client') === 'client';
this.configCountQueryAsLoad = ConfigUtil.get(ConfigUtil.keys.Fabric.CountQueryAsLoad, true);
this.configUseGateway = ConfigUtil.get(ConfigUtil.keys.Fabric.Gateway, false);
this.configLocalHost = ConfigUtil.get(ConfigUtil.keys.Fabric.GatewayLocalHost, true);
this.configDiscovery = ConfigUtil.get(ConfigUtil.keys.Fabric.Discovery, false);
ConfigValidator.validateNetwork(this.network, CaliperUtils.getFlowOptions(),
this.configDiscovery, this.configUseGateway);
this.networkUtil = new FabricNetwork(this.network, workspace_root);
this.fileWalletPath = this.networkUtil.getFileWalletPath();
this.defaultInvoker = Array.from(this.networkUtil.getClients())[0];
// NOTE: regardless of the version of the Fabric backend, the SDK must be at least v1.1.0 in order to
// use the common connection profile feature
if (this.version.lessThan('1.1.0')) {
throw new Error(`Fabric SDK ${this.version.toString()} is not supported, use at least version 1.1.0`);
}
if (this.networkUtil.isInCompatibilityMode() && this.version.greaterThan('1.1.0')) {
throw new Error(`Fabric 1.0 compatibility mode is detected, but SDK version ${this.version.toString()} is used`);
}