-
Notifications
You must be signed in to change notification settings - Fork 27
Add missing transaction categories #89
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
Add missing transaction categories #89
Conversation
Contrary to Bitcoin Core's v17 docs, there are *5* transaction categories that might be returned as part of a response to `listtransactions`, `listsinceblock`, or `gettransaction`. While Core fixed this omission in the docs in bitcoin/bitcoin#14653, we didn't account for them in the respective model's `enum`, leading to calls to `get_transaction` randomly failing with the rather obscure error message: ``` Err(JsonRpc(Json(Error("unknown variant `generate`, expected `send` or `receive`", line: 1, column: 682)))) ``` Here, we fix this omission and add the missing categories.
This is broken in more than just the last release (I assume) and also since the docs build is broken I rekon we just fix both and do a new release - and make the policy for now that only the latest version is supported. Ok with you? EDIT: Oh woops, we need a point release to fix the docs so I'll include this patch too. |
Receive, | ||
/// Coinbase transactions received with more than 100 confirmations. |
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.
I'm going to merge this but just flagging that now there are docs in v17
that came from a later version of Core. We have an outstanding issue #59 that describes how the re-exports include docs so version specific types have the 'wrong' docs on them.
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.
ACK f31fe46
Yeah this is always the kind of error message, its not great is it. That is the reason I want this crate really well tested (its not currently) so downstream never sees this - that is the dream anyway. |
Backported to 0.6.0 in #91 |
Contrary to Bitcoin Core's v17 docs, there are five transaction categories that might be returned as part of a response to
listtransactions
,listsinceblock
, orgettransaction
. While Core fixed this omission in the docs in bitcoin/bitcoin#14653, we didn't account for them in the respective model'senum
, leading to calls toget_transaction
randomly failing with the rather obscure error message:Here, we fix this omission and add the missing categories. Note that while the doc fix bitcoin/bitcoin#14653 was shipped as part of
v18
, the categories are pre-existing, which is why we simply fix thev17
andmodel
variants in-place here.@tcharding This might warrant a patch release, IMO?