Skip to content

backport: Add missing transaction categories #91

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

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

tcharding
Copy link
Member

This is a backport of the single patch in #89.

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.

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.
@tcharding tcharding changed the base branch from master to 0.6.x March 10, 2025 22:46
@tcharding tcharding merged commit c0bad22 into rust-bitcoin:0.6.x Mar 10, 2025
27 checks passed
@tcharding tcharding deleted the 03-11-backport-89 branch March 11, 2025 03:23
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.

2 participants