-
Notifications
You must be signed in to change notification settings - Fork 31
Add missing return fields in v20 and v21 #267
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
tcharding
merged 5 commits into
rust-bitcoin:master
from
jamillambert:0618-v21-missing-fields
Jun 25, 2025
Merged
Add missing return fields in v20 and v21 #267
tcharding
merged 5 commits into
rust-bitcoin:master
from
jamillambert:0618-v21-missing-fields
Jun 25, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Right to rebase now mate. |
One of the methods, `createmultisig` was missing a field in v20. It is missing another field in v23. Add all of the missing fields and update the models, into function and reexports accordingly. Redefinitions of the types and into functions are copies of the v17 versions with the missing field added.
v21, v23 and v28 had missing return fields. Redefine the type and into functions with the missing fields in v21 and v23, add to existing definition in v28. Update other into functions.
v21, v22 and v24 had missing return fields. Redefine the type and into functions with the missing fields. Update model and other into functions.
getnetworkinfo had missing fields in v21 and v28. getpeerinfo had missing fields in multiple versions. Redefine the types with the missing fields. Add the fields to the `GetNetworkInfo` model and update the into functions. Update the reexports.
Reordering of the reexports alphabetically, no other changes.
bba39eb
to
51ebe64
Compare
Rebased. Didn't even get a merge conflict in the reexports. Score! |
tcharding
approved these changes
Jun 25, 2025
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 51ebe64
BOOM! Good effort man, turn the crank. |
This was referenced Jun 27, 2025
tcharding
added a commit
that referenced
this pull request
Jun 28, 2025
…d for 16ae504 Add serde(deny_unknown_fileds) (Jamil Lambert, PhD) 6dcf4c3 Fix comment and derive order for method (Jamil Lambert, PhD) e84d8e9 Reorder derives to be the same (Jamil Lambert, PhD) Pull request description: If there are missing return fields in the types structs the integration tests still pass. All of the missing fields have been added in #243, #251, #255, #267 and #272. The solution suggested in issue #241 is adding `#[serde(deny_unknown_fields)]` to each struct which makes the test fail if there are fields returned that are not in the struct. - First two patches: do a small code reorganisation to make sure the third patch that uses a search and replace catches all cases. - Third patch: add `#[serde(deny_unknown_fields)]` to all structs in `types` that derive `Serialize` and therefore use serde. Using a search and replace. Closes #241 ACKs for top commit: tcharding: ACK 16ae504 Tree-SHA512: 5e898edb3b1ce9a05cd3c576b71caf9f96a2cd0f29660a480f6d5775d682fb277665c013cb52c986d90d37f36c5bc320139d351ffc29e1a755d72d11ad185c4f
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some of the types in v20 and v21 had missing return fields.
For each of the following RPCs that were missing a return field in v20 or v21 check for further changes up to v29 and implement them:
createmultisig
getblockchaininfo
getmempoolinfo
getnetworkinfo
getpeerinfo
Add all of the missing fields update the models, into function and reexports accordingly. Redefinitions of the types and into functions are modified copies of the most recent version of the RPC that had fields added.
Run the formatter in a separate commit to make the changes to the reexports easier to review.