Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/ethapi: fix getTransactionReceipt #16217

Merged
merged 1 commit into from
Feb 28, 2018

Conversation

karalabe
Copy link
Member

@karalabe karalabe commented Feb 28, 2018

This PR is a half revert of #15665.

The original issue the above PR was meant to fix is the graceful handling of some database corruption where a receipt was missing. Unfortunately the PR broke our RPC APIs.

In Go world it generally makes sense to return an error if something is not found, but the RPC API doesn't have standardized errors speced. Every tool assumes that if the thing requested is not available, null is returned. The above PR broke this. This PR tries to fix it.

Note: It is debatable whether or not the spec should be changed, but we should conform to the spec and the expected behavior, not the "clean" behavior unfortunately.

Fixes #16213
Fixes #16092

Copy link
Contributor

@fjl fjl left a comment

Choose a reason for hiding this comment

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

The general convention in all our APIs is to return null if something is not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants