Skip to content

Commit

Permalink
fix for acceptance test
Browse files Browse the repository at this point in the history
Signed-off-by: Nischal Sharma <[email protected]>
  • Loading branch information
NickSneo committed Nov 23, 2023
1 parent d6e5eeb commit 2687854
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package org.hyperledger.besu.tests.acceptance.dsl.privacy.transaction;

import org.hyperledger.besu.datatypes.Address;
import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.ethereum.privacy.PrivacyGroupUtil;
import org.hyperledger.besu.tests.acceptance.dsl.privacy.PrivacyNode;
import org.hyperledger.besu.tests.acceptance.dsl.privacy.condition.PrivGetTransactionReceiptTransaction;
Expand Down Expand Up @@ -117,7 +118,7 @@ public PrivGetLogsTransaction privGetLogs(
}

public PrivTraceTransaction privTraceTrasnaction(
final String privacyGroupId, final String transactionHash) {
final String privacyGroupId, final Hash transactionHash) {
return new PrivTraceTransaction(privacyGroupId, transactionHash);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import static org.assertj.core.api.Assertions.assertThat;

import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.tests.acceptance.dsl.transaction.NodeRequests;
import org.hyperledger.besu.tests.acceptance.dsl.transaction.Transaction;

Expand All @@ -24,9 +25,9 @@
public class PrivTraceTransaction implements Transaction<String> {

private final String privacyGroupId;
private final String transactionHash;
private final Hash transactionHash;

public PrivTraceTransaction(final String privacyGroupId, final String transactionHash) {
public PrivTraceTransaction(final String privacyGroupId, final Hash transactionHash) {
this.privacyGroupId = privacyGroupId;
this.transactionHash = transactionHash;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ public Request<?, EthLog> privGetLogs(
}

public Request<?, PrivTraceTransaction> privTraceTransaction(
final String privacyGroupId, final String transactionHash) {
final String privacyGroupId, final Hash transactionHash) {

return new Request<>(
"priv_traceTransaction",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.web3j.utils.Restriction.UNRESTRICTED;

import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.tests.acceptance.dsl.privacy.ParameterizedEnclaveTestBase;
import org.hyperledger.besu.tests.acceptance.dsl.privacy.PrivacyNode;
import org.hyperledger.besu.tests.acceptance.dsl.privacy.account.PrivacyAccountResolver;
Expand Down Expand Up @@ -64,13 +65,14 @@ public void getTransactionTrace() {
/*
Updating the contract value
*/
String transactionHash = doTransaction(privacyGroupId, simpleStorageContract, 1);
Hash transactionHash =
Hash.fromHexString(doTransaction(privacyGroupId, simpleStorageContract, 1));

final String result =
node.execute(privacyTransactions.privTraceTrasnaction(privacyGroupId, transactionHash));

assertThat(result).isNotNull();
System.out.println("privTransactionTrace = " + result);
assertThat(result).isNotNull();
}

private String createPrivacyGroup() {
Expand Down

0 comments on commit 2687854

Please sign in to comment.