tessera /storeraw needs base64 encoding of payload (#1926)

Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
pull/1944/head
Sally MacFarlane 4 years ago committed by GitHub
parent 2b4ba4c66b
commit 7998b99644
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/priv/GoQuorumStoreRawPrivateTransaction.java

@ -53,8 +53,10 @@ public class GoQuorumStoreRawPrivateTransaction implements JsonRpcMethod {
final String payload = requestContext.getRequiredParameter(0, String.class);
try {
LOG.debug("sending payload " + payload);
final StoreRawResponse storeRawResponse = enclave.storeRaw(payload);
LOG.debug("sending payload to GoQuorum enclave" + payload);
final StoreRawResponse storeRawResponse =
enclave.storeRaw(
Base64.getEncoder().encodeToString(Bytes.fromHexString(payload).toArray()));
final String enclaveLookupId = storeRawResponse.getKey();
LOG.debug("retrieved lookupId from GoQuorum enclave " + enclaveLookupId);
return new JsonRpcSuccessResponse(id, hexEncodeEnclaveKey(enclaveLookupId));

Loading…
Cancel
Save