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

rpcserver: Internal err on gettxout utxo fetch err. #2214

Merged
merged 1 commit into from
May 28, 2020

Conversation

itswisdomagain
Copy link
Member

Replace noTxInfoError with rpcInternalError when fetching utxo
entry errors in gettxout cmd handler. gettxout should never return
noTxInfoError because gettxout is about tx outputs not txs.

Update code comment and json-rpc docs to more clearly describe the
semantics of the gettxout method, particularly that JSON null is
returned if the requested txout cannot be found either because it
never existed or because it is spent (and possibly pruned).

Replace `noTxInfoError` with `rpcInternalError` when fetching utxo
entry errors in gettxout cmd handler. `gettxout` should never return
`noTxInfoError` because `gettxout` is about tx outputs not txs.

Update code comment and json-rpc docs to more clearly describe the
semantics of the gettxout method, particularly that JSON null is
returned if the requested txout cannot be found either because it
never existed or because it is spent (and possibly pruned).
@davecgh davecgh changed the title rpcserver: return rpcInternalError if FetchUtxoEntry errors in gettxout rpcserver: Internal err on gettxout utxo fetch err. May 28, 2020
Copy link
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

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

Please note that I changed the commit/PR title to match the code contribution guidelines.

@davecgh davecgh merged commit a2771b8 into decred:master May 28, 2020
@itswisdomagain itswisdomagain deleted the correct-gettxout-err branch May 28, 2020 19:24
@itswisdomagain
Copy link
Member Author

Please note that I changed the commit/PR title to match the code contribution guidelines.

Thanks! Still figuring out the PR titling pattern.

@davecgh
Copy link
Member

davecgh commented May 28, 2020

https://github.com/decred/dcrd/blob/master/docs/code_contribution_guidelines.md#ModelGitCommitMessages

Namely:

prefix: Short summary of changes (max 50 chars)

More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.

...

@davecgh davecgh added this to the 1.6.0 milestone Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants