Use secp256k1::{SecretKey, PublicKey} instead of own types#221
Use secp256k1::{SecretKey, PublicKey} instead of own types#221stevenroose wants to merge 3 commits intorust-bitcoin:masterfrom
Conversation
|
I based this off Carl's PR, so I didn't see the new Also apologies for adding the commas, that's my editor doing that for me :) I can remove them if they clutter the diff. |
src/util/address.rs
Outdated
|
It is disrespectful of reviewers time if you introduce lots of diffs because of your editor conf. |
That's why I apologized beforehand and offered to remove them if they were bothering. I'll remove them. EDIT: done :) |
|
If you know you'd have to apologize then just do not do it. |
src/util/address.rs
Outdated
| /// therefore only adds ambiguity | ||
| #[inline] | ||
| pub fn p2upkh(pk: &PublicKey, network: Network) -> Address { | ||
| pub fn p2pkh_uncompressed(pk: &PublicKey, network: Network) -> Address { |
There was a problem hiding this comment.
The name was fine as is.
There was a problem hiding this comment.
Yeah like I said, this sneaked in when rebasing off master. It's more consistent with the rest of the uncompressed variant methods, but I'm fine with changing it back.
src/util/address.rs
Outdated
| } | ||
|
|
||
| /// Create a pay to script address that embeds a witness pay to (uncompressed) public key | ||
| pub fn p2shwpkh_uncompressed (pk: &PublicKey, network: Network) -> Address { |
There was a problem hiding this comment.
Use of uncompressed keys was discouraged before SegWit. We should not encourage doing this by adding a method to create scripts for them within SegWit.
There was a problem hiding this comment.
Oh so we don't even want this to be possible?
There was a problem hiding this comment.
It remains possible, no matter what we do. It is however not a type of script that we should encourage creating by adding a method for it. In contrast p2pk is discouraged but there are tens of thousands of UTXOs with it.
|
Closing, see IRC and #183 |
…descriptor-pk descriptor: fix `is_uncompressed()` for `DescriptorPublicKey`
Another attempt to rewrite #183
I know some don't like the
_uncompressedvariants all that much, but I think it makes more sense like this than to have them stored in a separate struct.This comes with #220 for missing WIF stuff.