use of com.hedera.hashgraph.sdk.Client in project hedera-mirror-node by hashgraph.
the class SDKClient method getBootstrapClient.
private Client getBootstrapClient(AcceptanceTestProperties.HederaNetwork network, Set<NodeProperties> customNodes) {
if (!CollectionUtils.isEmpty(customNodes)) {
log.debug("Creating SDK client for {} network with nodes: {}", network, customNodes);
return Client.forNetwork(getNetworkMap(customNodes));
}
Client client;
switch(network) {
case MAINNET:
log.debug("Creating SDK client for MainNet");
client = Client.forMainnet();
break;
case PREVIEWNET:
log.debug("Creating SDK client for PreviewNet");
client = Client.forPreviewnet();
break;
case TESTNET:
log.debug("Creating SDK client for TestNet");
client = Client.forTestnet();
break;
default:
throw new IllegalStateException("Unsupported network specified!");
}
return client;
}
Aggregations