Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

[PAN-2928] return null private transaction receipt instead of error #1872

Merged

Conversation

iikirilov
Copy link
Contributor

@iikirilov iikirilov commented Aug 21, 2019

PR description

return null instead of error if private transaction does not exists

Fixed Issue(s)

PAN-2928

@iikirilov iikirilov force-pushed the pan-2928-return-null-private-tx-receipt branch from 2ae5adb to 2de3fce Compare August 21, 2019 21:37
@iikirilov iikirilov force-pushed the pan-2928-return-null-private-tx-receipt branch from abf7dab to 1579426 Compare August 27, 2019 09:57
@iikirilov
Copy link
Contributor Author

This PR is blocked by acceptance test problems that have been fixed in #1864

As this PR does not block anything itself it will not be patched

@iikirilov iikirilov force-pushed the pan-2928-return-null-private-tx-receipt branch from 363a25f to 75b237f Compare September 3, 2019 10:35
when(privacyParameters.getPrivateTransactionStorage()).thenReturn(privateTransactionStorage);
when(privateTransactionStorage.getEvents(any(Bytes32.class))).thenReturn(Optional.empty());
when(privateTransactionStorage.getOutput(any(Bytes32.class))).thenReturn(Optional.empty());
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rain-on rain-on self-requested a review September 4, 2019 00:17
@@ -104,7 +104,7 @@ private Request buildPostRequest(
response = client.newCall(request).execute();
responseBody = response.body().string();
} catch (final IOException e) {
throw new EnclaveException("Failed to contact Enclave", e);
throw new RuntimeException("Failed to contact Enclave", e);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this change. EnclaveException extends IllegalArgumentException which is a little misleading as this is a connection error.

If this is not ok let me know.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Worse things have/will happen.

@iikirilov iikirilov force-pushed the pan-2928-return-null-private-tx-receipt branch from 3bd6997 to 07465e2 Compare September 6, 2019 07:37
@iikirilov iikirilov force-pushed the pan-2928-return-null-private-tx-receipt branch from fa0fe33 to 0dac15d Compare September 10, 2019 22:49
@rain-on rain-on merged commit 6cdc090 into PegaSysEng:master Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants