-
Notifications
You must be signed in to change notification settings - Fork 27
ScriptPubkey
is strange
#166
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
Comments
Related to #156 |
tcharding
added a commit
to tcharding/corepc
that referenced
this issue
May 15, 2025
The `ScriptPubkey` type is a type that is returned by Core in various places. It seems like the Core devs put a fair bit of effort into it (probably because of this) and when the type changed in v22 it was changed in a way that was completely backwards compatible. I failed to fully understand this when first adding the type. With this patch applied there is now only one `ScriptPubkey` type (in `libr.s`) and also we add a model type. The `ScriptPubkey` type is unusual in that its fields can be used to create `TxOut` if tx value is known - which for example in `GetTxOut` it is. So here we also remove the v22 `GetTxOut` type since it only existed because of the perceived difference in `ScriptPubkey` which no longer exists. Fix: rust-bitcoin#166
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ScriptPubkey
is intypes/src/lib.rs
and used upto v21 inblockchain
andwallet
. Then inv22/blockchain
it changes shape butv22::wallet
seems to use the v17 one still.The text was updated successfully, but these errors were encountered: