Skip to content

Commit 1f461ff

Browse files
Resolve PR comments
Signed-off-by: Ivan Kavaldzhiev <[email protected]>
1 parent 855b17b commit 1f461ff

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

test/src/test/java/org/hiero/mirror/test/e2e/acceptance/client/MirrorNodeClient.java

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import com.hedera.hashgraph.sdk.Client;
1515
import com.hedera.hashgraph.sdk.ContractFunctionParameters;
1616
import com.hedera.hashgraph.sdk.ContractId;
17-
import com.hedera.hashgraph.sdk.LedgerId;
1817
import com.hedera.hashgraph.sdk.MirrorNodeContractEstimateGasQuery;
1918
import com.hedera.hashgraph.sdk.SubscriptionHandle;
2019
import com.hedera.hashgraph.sdk.TokenId;
@@ -80,7 +79,6 @@
8079
import org.hiero.mirror.test.e2e.acceptance.config.AcceptanceTestProperties;
8180
import org.hiero.mirror.test.e2e.acceptance.config.RestJavaProperties;
8281
import org.hiero.mirror.test.e2e.acceptance.config.Web3Properties;
83-
import org.hiero.mirror.test.e2e.acceptance.props.ExpandedAccountId;
8482
import org.hiero.mirror.test.e2e.acceptance.props.Order;
8583
import org.hiero.mirror.test.e2e.acceptance.steps.AbstractFeature.ContractMethodInterface;
8684
import org.hiero.mirror.test.e2e.acceptance.util.TestUtil;
@@ -105,16 +103,13 @@ public class MirrorNodeClient {
105103
private final Web3Properties web3Properties;
106104
private final Supplier<Boolean> partialStateSupplier = Suppliers.memoize(this::computeHasPartialState);
107105
private final Client queryClient;
108-
private final ExpandedAccountId defaultOperator;
109106

110107
public MirrorNodeClient(
111108
AcceptanceTestProperties acceptanceTestProperties,
112109
RestClient.Builder restClientBuilder,
113110
RestJavaProperties restJavaProperties,
114111
Web3Properties web3Properties)
115112
throws InterruptedException, URISyntaxException {
116-
defaultOperator = new ExpandedAccountId(
117-
acceptanceTestProperties.getOperatorId(), acceptanceTestProperties.getOperatorKey());
118113
this.acceptanceTestProperties = acceptanceTestProperties;
119114
this.restClient = restClientBuilder.build();
120115
this.restJavaClient = StringUtils.isBlank(restJavaProperties.getBaseUrl())
@@ -724,21 +719,7 @@ private Client createClient() throws InterruptedException, URISyntaxException {
724719
? web3Properties.getEndpoint()
725720
: acceptanceTestProperties.getRestProperties().getEndpoint();
726721

727-
LedgerId ledgerId =
728-
resolveLedgerId(acceptanceTestProperties.getNetwork().name());
722+
var ledgerId = acceptanceTestProperties.getNetwork().getLedgerId();
729723
return Client.forNetwork(Map.of()).setMirrorNetwork(List.of(endpoint)).setLedgerId(ledgerId);
730724
}
731-
732-
private LedgerId resolveLedgerId(String networkName) {
733-
String normalized = networkName.toLowerCase();
734-
735-
switch (normalized) {
736-
case "mainnet":
737-
case "testnet":
738-
case "previewnet":
739-
return LedgerId.fromString(normalized);
740-
default:
741-
return null;
742-
}
743-
}
744725
}

test/src/test/java/org/hiero/mirror/test/e2e/acceptance/steps/AbstractEstimateFeature.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import static org.hiero.mirror.test.e2e.acceptance.steps.AbstractFeature.SelectorInterface.FunctionType.VIEW;
99
import static org.hiero.mirror.test.e2e.acceptance.util.TestUtil.HEX_PREFIX;
1010

11-
import com.esaulpaugh.headlong.util.Strings;
1211
import com.google.common.base.Suppliers;
1312
import com.hedera.hashgraph.sdk.AccountId;
1413
import com.hedera.hashgraph.sdk.ContractFunctionParameters;
@@ -120,7 +119,6 @@ protected void validateGasEstimation(
120119
&& (VIEW.equals(method.getFunctionType()) || PURE.equals(method.getFunctionType()))) {
121120
try {
122121
var data = params.toBytes(method.getSelector()).toByteArray();
123-
System.out.printf("Performing ContractCallLocal with data: " + Strings.encode(data) + "\n");
124122
contractClient.executeContractQuery(contractId, method.getSelector(), estimateGasResult, data);
125123
} catch (PrecheckStatusException | TimeoutException e) {
126124
throw new RuntimeException(e);

0 commit comments

Comments
 (0)