Remove concrete types from types/src/vXY#514
Open
jamillambert wants to merge 4 commits intorust-bitcoin:masterfrom
Open
Remove concrete types from types/src/vXY#514jamillambert wants to merge 4 commits intorust-bitcoin:masterfrom
jamillambert wants to merge 4 commits intorust-bitcoin:masterfrom
Conversation
94d5a27 to
f9fb6c2
Compare
258dded to
3c7bbf7
Compare
tcharding
previously approved these changes
Feb 18, 2026
Member
|
Needs rebase because of #513 |
To be consistent with other types move the into_model function to the into module.
Use String instead of Txid in GetOrphanTxs. Add the error type for conversion into a Txid. Fix the into_model function to convert the String to a Txid.
The bitcoin types are only used in the into module. Move the imports to make it clearer that no concrete bitcoin types are used until the conversion into the modeled type.
Use String instead of Transaction in GetTransaction. Fix the into_model function to convert the String into a Transaction.
3c7bbf7 to
825e15d
Compare
Collaborator
Author
|
Rebased to remove merge conflicts. No changes, conflicts were due to adjacent line changes. |
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
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.
Concrete bitcoin types should only be used in the modelled type.
Go through every module file in
types/src/vXYremove thebitcoin::ximports and fix the issues that causes or put back if required for other reasons:GetBlockchainInfo::into_model()to theintomodule to be consistent with other types.GetOrphanTxs: UseStringinstead ofTxid, add the error type and fixinto_model().intomodule: Some bitcoin types are only used in the into module but are imported in the main module. Move the imports to make it clearer that no concrete bitcoin types are used until the conversion into the modeled type.GetTransaction: UseStringinstead ofTransactioninGetTransactionand fixinto_model().Closes #511