-
Notifications
You must be signed in to change notification settings - Fork 86
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
return correct gRPC error codes #503
base: master
Are you sure you want to change the base?
Conversation
4cacf9e
to
7236235
Compare
This PR includes some whitespace changes to common/common_test.go because my IDE (vscode) automatically formats files, and an earlier commit to this file used a different formatting convention. I recommend viewing the diff with whitespace ignored (click on the gear symbol near the top of the Files changed (diff) page). |
7236235
to
0c25590
Compare
// Fetch the block using the verbose option ("1") because it provides | ||
// both the list of txids, which we're not yet able to compute for | ||
// Orchard (V5) transactions, and the block hash (block ID), which | ||
// we need to fetch the raw data format of the same block. Don't fetch | ||
// by height in case a reorg occurs between the two getblock calls; | ||
// using block hash ensures that we're fetching the same block. | ||
params[1] = json.RawMessage("1") | ||
params := []json.RawMessage{heightJSON, json.RawMessage("1")} | ||
result, rpcErr := RawRequest("getblock", params) | ||
if rpcErr != nil { | ||
// Check to see if we are requesting a height the zcashd doesn't have yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's -5 for hashes but -8 for heights. What is weird is the comment above mentioning that it should be a hash but it is not. That's not part of the PR though.
closes #497