Fix unreachable code from calling derive_public_key#475
Merged
apoelstra merged 1 commit intorust-bitcoin:masterfrom Oct 19, 2022
Merged
Fix unreachable code from calling derive_public_key#475apoelstra merged 1 commit intorust-bitcoin:masterfrom
apoelstra merged 1 commit intorust-bitcoin:masterfrom
Conversation
Member
Author
|
Perhaps, @LLFourn may have some comments here. |
Member
|
I think we could add a It could be as simple as just checking whether wildcards exist, and if not, calling The point of #448 was that you wouldn't need to use dummy indices so I'd be sad to see that return.. |
DescriptorPublicKey::derive_public_key API hit an unreachable line when executing. public_key.derive_public_key(&secp).unwrap_err(); This commit removes the API altogether and only exposes the method via `DefiniteDescriptorKey`. Unfortunately, non-wildcard users would need to pass a dummy value to .at_derivation_index to get this struct, but I think this is okay.
c1291e0 to
c14d1ce
Compare
Member
Author
|
Removed the last commit. Now, this forces the users to convert to |
Merged
apoelstra
approved these changes
Oct 19, 2022
sanket1729
added a commit
to sanket1729/elements-miniscript
that referenced
this pull request
Oct 21, 2022
…022_10 c9e6b53 Merge rust-bitcoin/rust-miniscript#475: Fix unreachable code from calling derive_public_key
heap-coder
added a commit
to heap-coder/rust-miniscript
that referenced
this pull request
Sep 27, 2025
…ling derive_public_key
c14d1ceda11329a08a4a235c03cd49ff532eeedc Fix unreachable code from calling derive_public_key (sanket1729)
Pull request description:
DescriptorPublicKey::derive_public_key API hit an unreachable line when
executing.
public_key.derive_public_key(&secp).unwrap_err();
This commit removes the API altogether and only exposes the method via
`DefiniteDescriptorKey`. Unfortunately, non-wildcard users would need
to pass a dummy value to .at_derivation_index to get this struct, but I
think this is okay.
ACKs for top commit:
apoelstra:
ACK c14d1ceda11329a08a4a235c03cd49ff532eeedc
Tree-SHA512: e1372bf40aebe2a60ec85041776a12dd75d32443873c85ef2f46e12bb55e39538c3795062fb6fe04a1793d5aebfe504be5cf82284d43bd49abf29b30d586da0a
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.
DescriptorPublicKey::derive_public_key API hit an unreachable line when
executing.
public_key.derive_public_key(&secp).unwrap_err();
This commit removes the API altogether and only exposes the method via
DefiniteDescriptorKey. Unfortunately, non-wildcard users would needto pass a dummy value to .at_derivation_index to get this struct, but I
think this is okay.