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
tests: improve coverage for P2tr and AddressType #683
tests: improve coverage for P2tr and AddressType #683
Conversation
36a885e
to
11e979c
Compare
11e979c
to
8d5a8fd
Compare
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.
utACK 8d5a8fd
utACK 8d5a8fd |
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.
This won't work because we changed the P2tr API to correctly take in input internal_key
instead of output_key
.
src/util/address.rs
Outdated
#[test] | ||
fn test_p2tr() { | ||
// stolen from https://github.com/bitcoin/bips/blob/master/bip-0086.mediawiki#Test_vectors | ||
let key = hex_schnorr_key!("a60869f0dbcf1dc659c9cecbaf8050135ea9e8cdc487053f1dc6880949dc684c"); |
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.
This should be updated to take in the input internal key instead of the output key. We changed the since #691
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.
Rebased and removed test_p2tr
since it was the same as p2tr_from_untweaked
, added a couple of lines to the latter
The new AddressType test shows addresses that are valid but have no type. If in the future some of those get a type or become invalid (either voluntarily or due to a regression), this will highlight it.
8d5a8fd
to
0d463ec
Compare
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.
utACK 0d463ec
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 0d463ec
The new AddressType test shows addresses that are valid but have
no type. If in the future some of those get a type or become
invalid (either voluntarily or due to a regression), this will
highlight it.