Skip to content
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

Merged
merged 1 commit into from Nov 16, 2021

Conversation

LeoComandini
Copy link
Contributor

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.

dr-orlovsky
dr-orlovsky previously approved these changes Nov 12, 2021
Copy link
Collaborator

@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 8d5a8fd

@dr-orlovsky dr-orlovsky added this to the 0.28.0 milestone Nov 12, 2021
@dr-orlovsky dr-orlovsky added this to Ready for Review in Taproot Nov 14, 2021
@RCasatta
Copy link
Collaborator

utACK 8d5a8fd

Copy link
Member

@sanket1729 sanket1729 left a 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.

#[test]
fn test_p2tr() {
// stolen from https://github.com/bitcoin/bips/blob/master/bip-0086.mediawiki#Test_vectors
let key = hex_schnorr_key!("a60869f0dbcf1dc659c9cecbaf8050135ea9e8cdc487053f1dc6880949dc684c");
Copy link
Member

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

Copy link
Contributor Author

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.
Taproot automation moved this from Ready for Review to In review Nov 15, 2021
Copy link
Collaborator

@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 0d463ec

Copy link
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 0d463ec

Taproot automation moved this from In review to Ready for merge Nov 16, 2021
@sanket1729 sanket1729 merged commit e66a94f into rust-bitcoin:master Nov 16, 2021
Taproot automation moved this from Ready for merge to Done Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants