Move type definitions of pubkey/script hash types#1914
Move type definitions of pubkey/script hash types#1914apoelstra merged 2 commits intorust-bitcoin:masterfrom
Conversation
apoelstra
left a comment
There was a problem hiding this comment.
ACK ee33eefe04ef9aa809904b4c42c41f9cf2caf647
Kixunil
left a comment
There was a problem hiding this comment.
Wouldn't this be better as doctest?
|
Also From is defined in key.rs so the test could go there? I don't really understand why the impl PubkeyHash and the struct are in different files along with the traits. |
ee33eef to
b798939
Compare
BOOM! Thanks man. |
bitcoin/src/crypto/key.rs
Outdated
There was a problem hiding this comment.
In 76f9ab2df76d5a65ade52c339d51a2999b8446ab
Should be "a witness pubkey hash".
|
You say I think we should use the name |
|
ack b798939fde1d9890a93d41abe31eaf23e4a5356e other than the |
|
Will fix emty/new thing as suggested.
Well after this one can no longer write |
|
I just realized the new/empty change should not even be in this PR, its totally unrelated to pubkey/script hash - will pull it out into a separate PR. |
921b2fe to
9d9fa62
Compare
|
Added a patch |
apoelstra
left a comment
There was a problem hiding this comment.
ACK 9d9fa623e401b1e75c6720a71c6d874a5738cfbe
9d9fa62 to
dcfbafd
Compare
|
Rebased on master (to pick up #1927). No other changes. |
apoelstra
left a comment
There was a problem hiding this comment.
ACK dcfbafd75572801e1fd8582c165a3cf956b0d80b
dcfbafd to
47bde36
Compare
|
Removed the first two patches (because we now have #1925) and rebased. |
47bde36 to
10a95a6
Compare
|
Pulled master and rebased, woops. |
apoelstra
left a comment
There was a problem hiding this comment.
ACK 10a95a6cf98c97f397affedfb44f1bdaca1b2178
Improve the pubkey hash types by doing: - Define the types in the `crypto::key` module - Add From<&PublicKey> impl for `PubkeyHash` Keep the current crate level re-export so this does not impact the public API _if_ people are using the re-export but is still a breaking change.
Improve the script hash types by doing: - Define the types in the `crypto::script` module - Put the From impls directly below the type definitions Keep the current crate level re-export so this does not impact the public API _if_ people are using the re-export but is still a breaking change.
10a95a6 to
27b3c1e
Compare
|
Rebase only, no other changes. |
|
Merging based on #1945. The rebase made no changes. |
Total re-write since review. Now this PR moves the hash type definitions out of
hash_types. Please see #1909 (comment) for more.No longer adds unit tests.
Fix: #1909