use of com.hedera.services.bdd.suites.utils.validation.domain.VersionInfoScenario in project hedera-services by hashgraph.
the class ValidationScenarios method versionsScenario.
private static HapiApiSpec versionsScenario() {
try {
ensureScenarios();
if (scenarios.getVersions() == null) {
scenarios.setVersions(new VersionInfoScenario());
}
var versions = scenarios.getVersions();
int[] hapiProto = Arrays.stream(versions.getHapiProtoSemVer().split("[.]")).mapToInt(Integer::parseInt).toArray();
int[] services = Arrays.stream(versions.getServicesSemVer().split("[.]")).mapToInt(Integer::parseInt).toArray();
return customHapiSpec("VersionsScenario").withProperties(Map.of("nodes", nodes(), "default.payer", primaryPayer(), "default.node", defaultNode(), "fees.useFixedOffer", "true", "fees.fixedOffer", "" + FEE_TO_OFFER, "startupAccounts.literal", payerKeystoreLiteral())).given(keyFromPem(() -> pemForAccount(targetNetwork().getScenarioPayer())).name(SCENARIO_PAYER_NAME).linkedTo(() -> String.format("0.0.%d", targetNetwork().getScenarioPayer()))).when().then(getVersionInfo().payingWith(SCENARIO_PAYER_NAME).setNodeFrom(ValidationScenarios::nextNode));
} catch (Exception e) {
log.warn("Unable to initialize versions scenario, skipping it!", e);
errorsOccurred.set(true);
return null;
}
}
Aggregations