Remove redundant duplicated keys check#761
Merged
danielabrozzoni merged 1 commit intobitcoindevkit:masterfrom Sep 26, 2022
Merged
Remove redundant duplicated keys check#761danielabrozzoni merged 1 commit intobitcoindevkit:masterfrom
danielabrozzoni merged 1 commit intobitcoindevkit:masterfrom
Conversation
This check is redundant since it's already performed by miniscript (see https://docs.rs/miniscript/7.0.0/miniscript/miniscript/analyzable/enum.AnalysisError.html#variant.RepeatedPubkeys) and it was incorrectly failing on tr descriptors that contain duplicated keys across different taproot leaves Fixes bitcoindevkit#760
| "tr(cNJmN3fH9DDbDt131fQNkVakkpzawJBSeybCUNmP1BovpmGQ45xG,{pk(tprv8ZgxMBicQKsPdDArR4xSAECuVxeX1jwwSXR4ApKbkYgZiziDc4LdBy2WvJeGDfUSE4UT4hHhbgEwbdq8ajjUHiKDegkwrNU6V55CxcxonVN/*),pk(8aee2b8120a5f157f1223f72b5e62b825831a27a9fdf427db7cc697494d4a642)})" | ||
| } | ||
|
|
||
| pub(crate) fn get_test_tr_dup_keys() -> &'static str { |
Member
There was a problem hiding this comment.
Could this string just be added to test_taproot_load_descriptor_duplicated_keys or do you anticipate using this descriptor in other tests?
Member
Author
There was a problem hiding this comment.
I think it could be used in other tests, for example if we want to see how the policy module deals with duplicated keys
danielabrozzoni
approved these changes
Sep 25, 2022
Member
danielabrozzoni
left a comment
There was a problem hiding this comment.
Code review ACK e2bf973 - the code looks good to me, but I didn't test manually
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This check is redundant since it's already performed by miniscript (see https://docs.rs/miniscript/7.0.0/miniscript/miniscript/analyzable/enum.AnalysisError.html#variant.RepeatedPubkeys) and it was incorrectly failing on tr descriptors that contain duplicated keys across different taproot leaves
Fixes #760
Changelog notice
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingBugfixes: